Hi
Can anyone help me in the answer of the following?
1- Write a Java program to read a Name, ID and marks for 5 courses. Find the Total and Average of 5 courses. Display the values of all variables.
Hint: Use for loop to get the input for 5 marks. Don’t use 5 different variables.
2- Write a java program to display the current date in the following formats
a. 10/Mar/2013
b. 10 March 4 PM
c. Sunday 4:20:26
3- Consider the string “Education”. Write a java program for the following:
d. Display the number of characters
e. Find the position of “t”
f. Extract the smallest string “cat” from the given string
4- Consider A as 10 and B as 28. Write a java program to display the highest and smallest among these two numbers using Math class.
5- Write a java program to find the square root of every number between 20 and 40.Use any loop.
6- The following program contains errors during compilation. Fix the error to run the program successfully. Rewrite the program.
class simple
{
puplic static void main(String s)
int a,b,c;
Scanner s=new Scaner(System.out);
a=s.nextint();
b=s.nextInt();
c=a+b;
System.out.printn("Addition of two numbers:"c);
}
}
Please help and many thanks