Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Suresh Shahapurkar
javaprogram 14
1 Answer(s)      3 years and 2 months ago
Posted in : Java Beginners


Write a java program to calculate the percentage of a student marks by using java airthmatic operators like +(addition),%(division).


Advertisement
View Answers

August 23, 2011 at 11:37 AM


import java.util.*;
public class Student
{
    public static void main(String[]args){

Scanner input=new Scanner(System.in);
System.out.println("MAXIMUM MARKS in each sub : 100");
System.out.print("Enter Marks1: ");
int m1=input.nextInt();
System.out.print("Enter Marks2: ");
int m2=input.nextInt();
System.out.print("Enter Marks3: ");
int m3=input.nextInt();
System.out.print("Enter Marks4: ");
int m4=input.nextInt();
System.out.print("Enter Marks5: ");
int m5=input.nextInt();
int tm=m1+m2+m3+m4+m5;
double percentage=(double)tm/500;
System.out.println("Percentage of student is: "+(percentage*100)+" %");
    }
}


Related Tutorials/Questions & Answers:
javaprogram 14
javaprogram 14  Write a java program to calculate the percentage of a student marks by using java airthmatic operators like +(addition),%(division).   import java.util.*; public class Student { public static void
javaprogram 26
javaprogram 26  Write a java progtram to create two classes commercial and domestic. override the metod calculatebill() of commercial class(Rs.8 per unit)into domestic class(Rs 6 per unit) to comput electricity bill for both
Advertisements
Chapter 14. Security Management
Chapter 14. Security ManagementPrev Part I. Exam Objectives Next    Chapter 14. Security Management Identify correct and incorrect statements about
Open Source Symbian OS
of Symbian's existence more than 14 mobile device manufacturers have adopted
Common Interview Questions Page - 4
Common Interview Questions Page - 4       Question: 14. Are you a team player?  Answer: Working together as a team is the key point in achieving greater goal than
Java basics
be similar to class name. (ex. If class name is JavaProgram than file name should
java
java  how to print 11 12 22 13 23 33 14 24 34 44 15 25 35 45 55
help m e
help m e  11 12 22 13 23 33 14 24 34 44 15 25 35 35
c program
11 12 13 14 5 6 7 8 9 10 11 12 13 14 15 6 7 8 9 10 11 12 13 14 15 16 7 8 9 10 11 12 13 14 15 16 17 8 9 10 11 12 13 14 15 16 17 18 9 10 11 12 13 14 15 16 17 18 19 10
c program
5 6 7 8 9 10 11 12 13 4 5 6 7 8 9 10 11 12 13 14 5 6 7 8 9 10 11 12 13 14 15 6 7 8 9 10 11 12 13 14 15 16 7 8 9 10 11 12 13 14 15 16 17 8 9 10 11 12 13 14
Displaying Hierarchical data in JTree
;JavaProgram", "JavaNews",  "Java","project"...;JavaTeamName->Amit Java: JavaProgram ->JavaBook->Java->JavaProgram  
Java arraylist of arraylist
");     }   } } Output [[14, 8, 7], [0, 7, 11], [14, 9, 14]] 14 8 7  0 7 11  14 9 14
pattern java example
pattern java example  how to print this 1 2 6 3 7 10 4 8 11 13 5 9 12 14 15
loops
loops  how to print 11 12 22 13 23 33 14 24 34 44 15 25 35 45 55 plz reply fast...EMERGENCY
LINK
LINK  Thank you friend.cant we use single click instead of double click and also for four link u has given the example but i have 14 links in that case wat i should do
java patern - Java Beginners
java patern  write a program to print the given pattern? 1 10 11 20 2 9 12 19 3 8 13 18 4 7 14 17 5 6 15 16
dialog box size allignment
dialog box size allignment  actually i have 1 button,when clicked on it has to show dialog box containing 14 rows and 3 columns(jtextfield... box only i am able to view the 14 rows and 3 columns of data.with out resizing how
Hibernate - Hibernate
. INFO: Not binding factory to JNDI, no JNDI name configured Aug 14, 2008 12:06... schema update Aug 14, 2008 12:06:11 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: fetching database metadata Aug 14, 2008 12:06:11 PM
Core Java
Core Java   Hi, Can any one please tell me the program to print the below matrix in a spiral order. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Thanks a lat in advance
patterns printing using for loop in java
patterns printing using for loop in java  how to write the code for the pattern as: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Update a group of records with one value in the same group
Table. ID Name 11 AA 11 BB 11 CC 12 CC 12 02 12 BB 13 CC 13 03 13 45 13 65 14 02 14 05 15 12 Required result table: ID NAME 11 AA 11 AA 11 AA 12 BB 12 BB 12 BB 13 CC 13 CC 13 CC 13 CC 14 02 14 05 15 12
logic for c language
logic for c language  01 02 03 04 05 06 20 21 22 23 24 07 19 32 33 34 25 08 18 31 36 35 26 09 17 30 29 28 27 10 16 15 14 13 12 11
programming
programming  if we write a code for nearest no divisible by 5 example: given no divisible by 5 nearest no 12 10-ans 14 15-ans
diamond print
13 14 15 7 8 9 10
sahabaj
sahabaj  print the pattern with algorithm and variable description? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 8
Drop down menu
Drop down menu  I have drop down list of some 14 links which links to the table,If i click each link the table should display below the link and again if i click the link the table should not appear. please help me
SCJP Module-5 Question-9
Given a sample code: public class Test { public static void main(String args[]) { int i = 9; while (i++ <= 12) { i++; } System.out.print(i); } } What will be the result of above code ? (1) 10 (2) 14 (3) 13 (4) 11 Answer
please help me for this program - Java Beginners
(inclusive) between those two values. Enter Start: 10 Enter End: 14 10 11 12 13 14   Hi Friend, Try the following code: import
 

 

 

DMCA.com