Computer Science, asked by saiswastiparija46371, 8 months ago

Write an pseudocode for the following: Take an input of student’s roll no, name, class and marks of two subjects(English, computer). Make a total of two subjects marks and check whether student is pass or fail based upon total marks.

Answers

Answered by ramabisa
1

Answer:

Explanation:

This is the JAVA program for your question

Before writing this code, the assumptions that I have made here are:

  1. The passing marks is 32
  2. The total marks is out of 80

import java.util.Scanner;

class student

{

public static void main(String[]args)

{

Scanner in = new Scanner(System.in);

System.out.println("Enter your name");

String name = in.nextLine();

System.out.println("Enter your roll.no");

int roll_no = in.nextInt();

System.out.println("Enter your class");

int class = in.nextInt();

System.out.println("Enter your English marks out of 80");

int english_marks = in.nextInt();

System.out.println("Enter your Computer marks out of 80");

int comp_marks = in.nextInt();

double total = english_marks + comp_marks;

System.out.println("Total marks: " + total);

if(total < 32)

{

System.out.println("You have failed");

}

else

{

System.out.println("You have passed");

}

}

}

Similar questions