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");
}
}
}
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.
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
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.
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.")
Output documentation
hhh
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.
program that take three decimal number as input and find the largest among them in assembly language
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.
without understanding the program giving a input
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.
<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>
create a program that can input 100 names
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.
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.
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.