Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Help

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help

    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

  2. #2
    Junior Member
    Join Date
    Mar 2013
    Posts
    13
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Best advice I can give is to apply all the amazing things you've learned about java up until this point to write some code that will solve the problems
    Hint: do them one at a time