-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperators.java
29 lines (27 loc) · 929 Bytes
/
operators.java
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
public class operators {
public static void main(String[] args) {
// Assign values of variables a and b as 55 and 70 respectively and then check if both the conditions a < 50 and a < b are true.
// int a = 55;
// int b = 70;
// System.out.println(a < 50);
// System.out.println(a < b);
// Write a program to print the power of 7 raised to 5
// int a = 7;
// for(int i = 0; i < 4;i++){
// a *= 7;
//
// }
// System.out.println(a);
// Write a program to calculate the total
// marks and percentage marks of a student who got 78, 45, and 62 marks in three subjects.
// int a,b,c;
//a = 78;
//b = 45;
//c = 62;
//int total_marks = a + b + c;
// System.out.println(total_marks);
//int out_of_marks = 300;
//double percentage = ((double) total_marks / out_of_marks) * 100;
//System.out.println(percentage);
}
}