Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
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.
Home
Education
Using Scanner, input name, class, div, roll...
asked
Nov 26, 2021
in
Education
by
JackTerrance
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
computer-science-interview-questions
computer-science-questions
1
Answer
0
votes
answered
Nov 26, 2021
by
JackTerrance
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
Q: Write a JAVA program to store the marks of any 5 subjects in different variables. Calculate total and average. Display the name of the student, total and average. DO NOT USE ANY INPUT METHOD
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: Write a JAVA program to store the marks of any 5 subjects in different variables. Calculate total and average. Display the name of the student, total and average.
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: to write a program to accept marks of three subjects and find the total mark and average marks in 3 subject
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: to write a program to accept marks of three subjects and find the total mark and average marks in 3 subject
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: WAP to display all the information of student (like name, class, roll no) in qbasic
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: write a program in python to enter the mark in 3 subjects and calculate total and assign grade. If total >= 200 grade is ‘A’ otherwise grade is ‘B’
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: input a sentence and print total number of times consecutive alphabet comes using for and charAt functionThe sentence you have to input is:
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: WRITE A PROGRAM TO READ DETAILS LIKE NAME, CLASS , AGE OF A STUDENT AND THEN PRINT THE DETAILS FIRSTLY IN SAME LINE AND THEN IN SEPERATE LINES
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: Write the XML tree structure of the following<class X >< student >< roll no> 01 </roll no>
Write the XML tree structure of the following < student > < roll no> 01 Alisha 02 Bitisha < student>...
asked
Dec 19, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: average marks in three suujul.
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: write a java program to print areaof an equilateral triangle . (without using scanner)
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: write a program to input a number and print table of the number using while loop
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: write a program in Java to input a number and print if it is a special number or not.
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
computer-science-interview-questions
computer-science-questions
0
votes
Q: Write a program to prompt the user for days and rate per day to compute total pay. Use 50 days and a rate of 3.5 per day to test the program. Total pay is equal to (days* Rate per day). You should use input to read a string and float() to convert the string to a number.
Write a program to prompt the user for days and rate per day to compute total pay. Use 50 days and a rate ... the string to a number. Select the correct answer from above options...
asked
Dec 1, 2021
in
Education
by
JackTerrance
computer-science-interview-questions
computer-science-questions
0
votes
Q: WAP in java to input 3 numbers from user and print the largest no. among them using nested if.
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
computer-science-interview-questions
computer-science-questions
...