in Education by
Using Scanner, input name, class, div, roll number and marks in three subjects of a student. Calculate total and average if grand total is 300. Print student name , total and average. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Answer: import java.util.Scanner; public class Marks { public static void main() { Scanner sc=new Scanner(System.in); System.out.println(“Enter name :”); String name= sc.nextLine(); System.out.println(“Enter Class :”); int std = sc.nextInt(); System.out.println(“Enter Division :”); int div = sc.nextInt(); System.out.println(“Enter Roll no. :”); int roll = sc.nextInt(); System.out.println(“Enter marks of English :”); double m1= sc.nextDouble(); System.out.println(“Enter marks of Maths :”); double m2= sc.nextDouble(); System.out.println(“Enter marks of Computer :”); double m3= sc.nextDouble(); double total = m1+m2+m3; double avg = total/3.0 ; System.out.println(“Name : “+name); System.out.println(“Total “+ total); System.out.println(“Average : “+avg); } }

Related questions

0 votes
    Write a JAVA program to store the marks of any 5 subjects in different variables. Calculate total and average. ... ANY INPUT METHOD Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    Write a JAVA program to store the marks of any 5 subjects in different variables. Calculate total and average. ... total and average. Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    to write a program to accept marks of three subjects and find the total mark and average marks in 3 subject Select the correct answer from above options...
asked Dec 27, 2021 in Education by JackTerrance
0 votes
    to write a program to accept marks of three subjects and find the total mark and average marks in 3 subject Select the correct answer from above options...
asked Dec 26, 2021 in Education by JackTerrance
0 votes
    WAP to display all the information of student (like name, class, roll no) in qbasic Select the correct answer from above options...
asked Dec 15, 2021 in Education by JackTerrance
0 votes
    write a program in python to enter the mark in 3 subjects and calculate total and assign grade. If total >= 200 ... grade is B' Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    input a sentence and print total number of times consecutive alphabet comes using for and charAt function The sentence ... is studying Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    WRITE A PROGRAM TO READ DETAILS LIKE NAME, CLASS , AGE OF A STUDENT AND THEN PRINT THE DETAILS FIRSTLY IN ... THEN IN SEPERATE LINES Select the correct answer from above options...
asked Dec 30, 2021 in Education by JackTerrance
0 votes
    Write the XML tree structure of the following < student > < roll no> 01 Alisha 02 Bitisha < student>...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    average marks in three suujul. Q5. Which drawing tool is used for the following activities in MS Word. a) To ... any four ISP CA. Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    write a java program to print areaof an equilateral triangle . (without using scanner) Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    write a program to input a number and print table of the number using while loop Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    write a program in Java to input a number and print if it is a special number or not. do this program using ... nested and while loop . Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    WAP in java to input 3 numbers from user and print the largest no. among them using nested if. Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
...