answersLogoWhite

0

main()

{

int p,m1,m2,m3,m4,m5;

printf("enter marks of 5 subjects");

scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5)l

p=(m1+m2+m3+m4+m5)/500*100;

if(p>=60)

printf("first");

else

{

if(p>=50)

printf("second");

else

{

if(p>=40)

printf("third");

else

printf("fail");

}

}

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

java program to print a mark sheet of students and the number of students is the user input for 5 subjects?

Here’s a simple Java program that prompts the user for the number of students and then collects marks for five subjects to print a marksheet: import java.util.Scanner; public class MarksSheet { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the number of students: "); int numStudents = scanner.nextInt(); for (int i = 1; i <= numStudents; i++) { System.out.println("Entering marks for Student " + i); int[] marks = new int[5]; for (int j = 0; j < 5; j++) { System.out.print("Enter marks for Subject " + (j + 1) + ": "); marks[j] = scanner.nextInt(); } System.out.println("Marks for Student " + i + ": " + java.util.Arrays.toString(marks)); } scanner.close(); } } This program uses a loop to gather and display marks for each student across five subjects.


What is the flowchart and pseudocode for a program that accept and displays the factorial of a number?

A flowchart for a program that accepts and displays the factorial of a number would include the following steps: Start, Input the number, Initialize a variable for the factorial, Use a loop to calculate the factorial by multiplying the variable by each integer up to the number, Output the result, and End. Pseudocode for the same program would look like this: START INPUT number factorial = 1 FOR i FROM 1 TO number DO factorial = factorial * i END FOR OUTPUT factorial END


What is the definition of input number?

The definiton of input number is the number going in. The input number is the oppsite of the output number. For instance:Input Output1 52 103 154 205 25The rule of the input and output number is input times five equals output.


What a program that accepts two numbers and tell whether the product of the two number is equal to or greater than 1000?

You can create a simple program in Python to achieve this. The program will prompt the user to input two numbers, calculate their product, and then check if the product is equal to or greater than 1000. If it is, the program will print a message confirming that; otherwise, it will indicate that the product is less than 1000. Here's a quick example: num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: ")) if num1 * num2 >= 1000: print("The product is equal to or greater than 1000.") else: print("The product is less than 1000.")


Which documentation is typically written first input output internal program or external program?

Output documentation

Related Questions

C program to print mark sheet of 5 subjects and the number of students is user input?

hhh


java program to print a mark sheet of students and the number of students is the user input for 5 subjects?

Here’s a simple Java program that prompts the user for the number of students and then collects marks for five subjects to print a marksheet: import java.util.Scanner; public class MarksSheet { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the number of students: "); int numStudents = scanner.nextInt(); for (int i = 1; i <= numStudents; i++) { System.out.println("Entering marks for Student " + i); int[] marks = new int[5]; for (int j = 0; j < 5; j++) { System.out.print("Enter marks for Subject " + (j + 1) + ": "); marks[j] = scanner.nextInt(); } System.out.println("Marks for Student " + i + ": " + java.util.Arrays.toString(marks)); } scanner.close(); } } This program uses a loop to gather and display marks for each student across five subjects.


An assembly language program that will take three decimal input and display minimum of them?

program that take three decimal number as input and find the largest among them in assembly language


What is legal input?

In a computer program, a legal input is something that can be put into a program and it will work. An illegal input may crash the program.


Which is not a way to input data into a program?

without understanding the program giving a input


Is a program with no input an incorrect program?

No, as long as it calculates something, displays something, or otherwise has an output that benefits the user, it is a program. It could be a program that makes a random number, or a program that tells the user a joke from a database.


Java script program to Print the Fibonacci series using array?

<script type = "text/javascript"> var input; var rev = 0; input=window.prompt ("Please enter a 5-digit number to be reversed."); input = input * 1; while (input > 0) { rev *= 10; rev += input % 10; input /= 10; } document.write ("Reversed number: " + rev); </script>


How do you create a program that can input 100 names using flowchart?

create a program that can input 100 names


How do you input 3 subjects and print percentage grade?

Print


A program to find that the input number is prime or not?

Use Wolfram|Alpha... go to the related link below, Wolfram|Alpha, and type in (is __ (number) prime) and then the program will compute that and tell you if it is prime or composite.


How to write a java program to extract the last digit from the input?

Assuming you've entered a multi-digit number whole number (an integer), then take the modus (%) of the number and 10. E.g., if the number input was 1234, then 1234 % 10 is 4. Thus the final digit is 4. Note that modus 10 is the same as dividing the number by 10 and taking the remainder.


What is robust on java?

A robust program is a program that will accept junk input and not crash. Example: a program that accepts "pancakes" for a date input and pops up a error box or just uses a date input so that this does not happen is a robust program.