import java.io.*;
class student
{
public static void main(String args[]) throws IOException
{
int rno;
String name,sex,grade;
double percentage;
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
String in;
System.out.print("Enter Roll No :");
rno=Integer.parseInt(br.readLine());
System.out.print("Enter Name :");
name=br.readLine();
System.out.print("Enter Sex :");
sex=br.readLine();
System.out.print("Enter percentage :");
in=br.readLine();
percentage=new Double(in).doubleValue();
System.out.println("Roll No :"+rno);
System.out.println("Name :"+name);
System.out.println("Sex :"+sex);
System.out.println("Percentage:"+percentage);
if(percentage>=80)
grade="A";
else if(percentage>=70)
grade="B";
else if(percentage>=60)
grade="C";
else
grade="D";
System.out.println("Grade :"+grade);
}
}
class student
{
public static void main(String args[]) throws IOException
{
int rno;
String name,sex,grade;
double percentage;
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
String in;
System.out.print("Enter Roll No :");
rno=Integer.parseInt(br.readLine());
System.out.print("Enter Name :");
name=br.readLine();
System.out.print("Enter Sex :");
sex=br.readLine();
System.out.print("Enter percentage :");
in=br.readLine();
percentage=new Double(in).doubleValue();
System.out.println("Roll No :"+rno);
System.out.println("Name :"+name);
System.out.println("Sex :"+sex);
System.out.println("Percentage:"+percentage);
if(percentage>=80)
grade="A";
else if(percentage>=70)
grade="B";
else if(percentage>=60)
grade="C";
else
grade="D";
System.out.println("Grade :"+grade);
}
}
No comments:
Post a Comment