Program:-
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//1. what will be the result of he following expression float a=7/4 * 9/4
float a = 7/4.0f * 9/2.0f;
System.out.print("The result of 7/4.0f *9/2.0f is :");
System.out.println(a);
//2.write a java program to encrypt a grade by adding 8 to it. decrypt it to shiw the grade .
char grade = 'B';
//encrypt
System.out.print("The encrypt of B is :");
grade =(char)(grade + 8);// use (char) to display the character value otherwise it display default value of J.
System.out.println(grade);
//decrept
System.out.print("The decrypt of J is :");
grade =(char) (grade - 8);
System.out.println(grade);
//3.Use comoarison operators to find out wether a guve number is greater then the user entered number or not
Scanner no = new Scanner(System.in);
System.out.println("enter the number:");
int b = no.nextInt();
System.out.print("The entered number is greater than 8 : ");
System.out.println(b>8);
//4.Write the following expression in a ja program:v^2 - u^2 / 2as
int v = 40;
int u =20;
int a1 = 5;
int s = 6;
float c = (v*v - u*u)/(2*a1*s);
System.out.print("The result of (v*v - u*u)/(2*a1*s) is :");
System.out.println(c);
// 5. find the value of expression int = 7 int a = 7*49/7+35/7
int a2 = (7*49)/7 +(35/7);
System.out.print("The result of (7*49)/7 +(35/7) is :");
System.out.println(a2);
}
}

