-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwhile30.java
More file actions
35 lines (30 loc) · 732 Bytes
/
while30.java
File metadata and controls
35 lines (30 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package whileGita;
import java.util.Scanner;
public class while30 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float a;
float b;
float c;
System.out.print("A:");
a = scanner.nextInt();
System.out.print("B:");
b = scanner.nextInt();
System.out.print("C:");
c = scanner.nextInt();
int k = 0;
float temp;
while ((a - c) >= 0)
{
a -= c;
temp = b;
while (temp - c >= 0F)
{
temp -= c;
++k;
}
}
System.out.print("Kvadrat Sig`imi:");
System.out.print(k);
}
}