Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part3 #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 72 additions & 1 deletion src/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,77 @@
public class Main {
public static void main(String[] args) {
// Приступил к ДЗ
// Приступил к ДЗ
//Task1
System.out.println("Task 1");
var dog = 8.0;
var cat = 3.6;
var paper = 763789;
System.out.println(dog);
System.out.println(cat);
System.out.println(paper);

//Task 2
System.out.println("Task 2");
dog = dog + 4;
cat = cat + 4;
paper = paper + 4;
System.out.println(dog);
System.out.println(cat);
System.out.println(paper);

//Task 3
System.out.println("Task 3");
dog = dog - 3.5;
cat = cat - 1.6;
paper = paper - 7639;
System.out.println(dog);
System.out.println(cat);
System.out.println(paper);

//Task 4
System.out.println("Task 4");
var friend = 19;
System.out.println(friend);
friend += 2;
System.out.println(friend);
friend = friend / 7;
System.out.println(friend);

//Task 5
System.out.println("Task 5");
var frog = 3.5;
System.out.println(frog);
frog = frog * 10;
System.out.println(frog);
frog = frog / 3.5;
System.out.println(frog);
frog = frog + 4;
System.out.println(frog);

//Task 6
System.out.println("Task 6");
var firstBoxersWeight = 78.2;
var secondBoxersWeight = 82.7;
var generalWeight = firstBoxersWeight + secondBoxersWeight;
System.out.println("Общий вес боксеров " + generalWeight + " кг.");
var differenceWeight = firstBoxersWeight - secondBoxersWeight;
System.out.println("Разница между весами бойцов " + differenceWeight + " кг.");

//Task 7
System.out.println("Task 7");
differenceWeight = secondBoxersWeight - firstBoxersWeight;
System.out.println("Разница между весами бойцов " + differenceWeight + " кг.");
differenceWeight = secondBoxersWeight % firstBoxersWeight;
System.out.println("Разница между весами бойцов " + differenceWeight + " кг.");

// Task 8
System.out.println("Task 8");
var generalHour = 640;
var workHour = 8;
var workers = generalHour / workHour;
System.out.println("Всего работников в компании " + workers);
workers = workers + 94;
workHour = generalHour / workers;
System.out.println("Если в компании работает " + workers + " человек, то всего " + workHour + " часов работы может быть поделено между сотрудниками");
}
}