Skip to content
Tejsumeru

Thoughts Become Reality

  • Tutorials
  • Video Tutorial
  • Tutorials
  • Video Tutorial
  • Java

    Write a java program which generates student grade report in console. Take student roll number and marks (out of 100) of 5 courses from user. Calculate the percentage and display grade of the student. Use appropriate control statements.

    December 15, 2019 - By tejsumeru.12@gmail.com

    The below program shows how to use array and store student’s details and fetch details. Here we are using for each loop which is used to iterate throughout entire array element. Example import java.util.Scanner; class FindGrade { //get roll number and marks of student and calculate percentage and grade public static void main(String args[]) { int sub[],i,total=0; float per=0.0f; Scanner sc; String rNo; sub=new int[5]; sc=new Scanner(System.in); System.out.println("Enter Roll Number"); rNo=sc.next(); for(i=0;i<5;i++) { System.out.println("Enter Marks Of Subject "+(i+1)); sub[i]=sc.nextInt(); total=total+sub[i]; } per=total*100/500; System.out.println("\n***** Details Of Student *****\n"); System.out.println("\nRoll Number "+rNo); System.out.println("Total Marks Gained Is "+total); System.out.println("Percentage Gained Is "+per); if(per>90)…

    Continue Reading

Categories

  • Android With Java
  • Android With Kotlin
  • C language
  • C++ Language
  • Data Structure
  • Error Solving
  • Flutter
  • Go Lang
  • Interview Quetions
  • Java
  • Javascript
  • Kotlin
  • Machine Learning
  • MATLAB
  • PHP
  • Python
  • SciPy
  • Tutorials
  • Wordpress
Graceful Theme by Optima Themes