السؤال الأول:
write a method,printprimes(int limit) that will print all prime numbers between1 and the limit value. the value of limit is passed as an argument to the method. you will need another method to check for primes.
السؤال الثاني:
write and run a program which contain the following:
a. input name,and 4 marks of a student by nested loop(use 2 variables only-name,marks)
b.find the total and average of these marks.
c. create and call a method(grade), pass the value of average to this method and return back the gread )fail[0-49],fair [50-59], medium [60-69] and exellent [90-100]) .
d. print the name, total,average and grade in one line.
e. repeat this process for 5 students.
write a method,printprimes(int limit) that will print all prime numbers between1 and the limit value. the value of limit is passed as an argument to the method. you will need another method to check for primes.
السؤال الثاني:
write and run a program which contain the following:
a. input name,and 4 marks of a student by nested loop(use 2 variables only-name,marks)
b.find the total and average of these marks.
c. create and call a method(grade), pass the value of average to this method and return back the gread )fail[0-49],fair [50-59], medium [60-69] and exellent [90-100]) .
d. print the name, total,average and grade in one line.
e. repeat this process for 5 students.