You are on page 1of 53

Q1: Input a name then output congratulate this name that he passed

the exam
Q2:Input side length of a square and output its area
Q3: input radius of a circle then output the area
Q4: Input a mark in an exam out of 100 then print if it pass or fail
Q5: Input 3 angles and print if it is a triangle or not
Q6: Input 3 numbers print the largest one
Q7: Input a grade if the grade is excellent print your mark is above 90, if
the grade is v.good print your mark is above 85, good print your mark is
greater then 60, if the grade is pass then print you have passed the
exam. (Try using if and using case)
Q8: Input 300 marks get their total
Q9: input 200 mark calculate their average
Q10: Input 80 numbers then print how many numbers are greater than
50
Q11: Input 20 integers count how many are positive how many negative
and the numbers that are equal to 0
Q11: input 10 print the max
Q12: A quiz in a class that have 50 students input all 50 marks print the
min, max, average.
Q13: By inputting 15 grades of an exam out of 50. Calculate the pass
percentage in this exam
Q14: Input 250 numbers get the average of numbers greater than 100
Q15: Input 50 marks then calculate the max mark, if the max is greater
than 95 print congratulations
Q16: Input 60 marks then output the diffrenece between the min mark
and the max mark
Q17: Input numbers until the total is greater than 1300
Q18: Input height of students get the average of heights that are
greater than 180
Q19: Input 20 marks of an exam only calculate the average of the marks
that have passed
Q20: Input 40 marks validate that the input is only between o and 40
Q21: Input 3 marks, make sure that they are different then outout the
largest and the smallest mark
Q22: Input temperatures make sure that they are between 10 and 35
end the program when the total is greater than 250
Q23: Input marks to get the average end the program and calculate
average by inputting -1
Q24: Input 50 names into an array
Q25: There are 30 marks in an array count how many numbers of them
are greater than 20
Q26: Calculate the average of 60 numbers that are stored in an array
Q27: Known that there are 100 numbers stored in an array print the
max, min, calculate their average
Q28: Input a name and its mark in another array, print out the student
name with the highest mark

You might also like