Easy Just Copy This Code and save It Compile It and Run IT!!!
import java.io.*;
public class PRAC4
{
public static void main (String []args)throws IOException
{
int roll_no;
String full_name;
String grade;
String section;
Double sdt;
Double sfc;
Double db;
Double cs;
Double total;
Double average;
System.out.println("--------------");
System.out.println("Inputs");
System.out.println("--------------");
System.out.println("Enter Roll No :");
roll_no=readInteger();
System.out.println("Enter Student Full Name");
full_name=readString();
System.out.println("Enter Student Grade :");
grade=readString();
System.out.println("Enter Student Section :");
section=readString();
System.out.println("OBTAINED MARKS :");
System.out.println("--------------");
System.out.println("Enter SDT :");
sdt=readDouble();
System.out.println("Enter SFC :");
sfc=readDouble();
System.out.println("Enter DB :");
db=readDouble();
System.out.println("Enter CS :");
cs=readDouble();
total=sdt+sfc+cs+db;
average=total/4;
System.out.println("Enter Full Name :"+full_name);
System.out.println("--------------");
System.out.println("Grade :"+grade);
System.out.println("--------------");
System.out.println("Section :"+section);
System.out.println("--------------");
System.out.println("SDT :"+sdt);
System.out.println("--------------");
System.out.println("SFC :"+sfc);
System.out.println("--------------");
System.out.println("DB :"+db);
System.out.println("--------------");
System.out.println("CS :"+cs);
System.out.println("--------------");
System.out.println("Sum :" +total);
System.out.println("--------------");
System.out.println("Percentage :"+average);
System.out.println("--------------");
}
public static int readInteger()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return (Integer.parseInt(tmp));
}
public static Double readDouble()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return (Double.parseDouble(tmp));
}
public static String readString()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return ((tmp));
}
}
public class PRAC4
{
public static void main (String []args)throws IOException
{
int roll_no;
String full_name;
String grade;
String section;
Double sdt;
Double sfc;
Double db;
Double cs;
Double total;
Double average;
System.out.println("--------------");
System.out.println("Inputs");
System.out.println("--------------");
System.out.println("Enter Roll No :");
roll_no=readInteger();
System.out.println("Enter Student Full Name");
full_name=readString();
System.out.println("Enter Student Grade :");
grade=readString();
System.out.println("Enter Student Section :");
section=readString();
System.out.println("OBTAINED MARKS :");
System.out.println("--------------");
System.out.println("Enter SDT :");
sdt=readDouble();
System.out.println("Enter SFC :");
sfc=readDouble();
System.out.println("Enter DB :");
db=readDouble();
System.out.println("Enter CS :");
cs=readDouble();
total=sdt+sfc+cs+db;
average=total/4;
System.out.println("Enter Full Name :"+full_name);
System.out.println("--------------");
System.out.println("Grade :"+grade);
System.out.println("--------------");
System.out.println("Section :"+section);
System.out.println("--------------");
System.out.println("SDT :"+sdt);
System.out.println("--------------");
System.out.println("SFC :"+sfc);
System.out.println("--------------");
System.out.println("DB :"+db);
System.out.println("--------------");
System.out.println("CS :"+cs);
System.out.println("--------------");
System.out.println("Sum :" +total);
System.out.println("--------------");
System.out.println("Percentage :"+average);
System.out.println("--------------");
}
public static int readInteger()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return (Integer.parseInt(tmp));
}
public static Double readDouble()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return (Double.parseDouble(tmp));
}
public static String readString()throws IOException
{
InputStreamReader isr=new InputStreamReader (System.in);//Bridge
BufferedReader br=new BufferedReader (isr);//way
String tmp=br.readLine(); return ((tmp));
}
}
No comments:
Post a Comment