Computer Science, asked by bpillaisandeep, 1 day ago

1)Write a program to accept price and quantity of ‘n’ items. Calculate and print the amount(price* qty).Calculate discount as 4% for all items.Print the output in the format given below for each product.

Price qty Amount discount net amount

2) Write a program to accept marks obtained for three subjects by ‘n’ students .Print the marks, total average and grade obtained by each student.

Average Grade

>=90 A

60- <90 B

40-<60 C

<40 F

Answers

Answered by chatterjeearchisman
6

Program

/*program to accept the marks*/

class marks

{

public static void main(String args[])

{

int marks;

if (x=>=90);

system. out.print("Congratulations, you have passed with an A-rank);

{

else if(x=>90);

system. out.print("Congratulations, you have passed with a B-rank);

{

else if(x=>60);

system. out.print("Congratulations, you have passed with a C-rank);

else if(x=>40);

system. out.print("Sorry, you have failed! Better luck next time!);

}

}

This will do!

P.S: This is the modern variation. If so desired, I'll be more than happy to provide the old one.

Similar questions
Math, 15 hours ago