1) An algorithm to compute the area of a circle and square. Another algorithm sums test scores and determines the smallest number between two inputs. A third algorithm determines the grade for an exam score between 1-100 and assigns a distinction, merit, pass, or fail.
1) An algorithm to compute the area of a circle and square. Another algorithm sums test scores and determines the smallest number between two inputs. A third algorithm determines the grade for an exam score between 1-100 and assigns a distinction, merit, pass, or fail.
1) An algorithm to compute the area of a circle and square. Another algorithm sums test scores and determines the smallest number between two inputs. A third algorithm determines the grade for an exam score between 1-100 and assigns a distinction, merit, pass, or fail.
1) Write an algorithm to compute the area of a circle.
2) Write an algorithm to compute the area of a square
3) Design an algorithm and the corresponding flowchart for adding the test scores ad given below: 26, 49, 98, 87, 62, 75.The problem with this algorithm is that, some of the steps appear more than once, Once could shorten the algorithm or flowchart. 4) Write another algorithm that can sum an endless number of positive numbers and stops when the input is -1. 5) Write an algorithm that determines the smallest number between two numbers. 6) Write algorithm that takes a number and displays ‘Positive’ if the number is positive and ‘Negative’ If the number is negative. 7) Write an algorithm that takes an examination mark and test it for the award of a grade. The mark is a whole number between 1 and 100. Grades are awarded according to the following criteria. Greater than 80 is “Distinction”, between 60 and 80 is “Merit”, between 40 and 60 is “Pass” and below 40 is “Fail” 8) A survey has been carried out to discover the most popular sport. The results will be typed into the computer for analysis. Write a program to accomplish this. The sports are denoted by “H” for handball, “B” for basket ball, “F” for football and “V” for volley ball. 9) A program segment to print out each character typed at a keyboard until the character ‘q’ is entered. 10) Write a program that will output the square root of any number input until the number input is zero. 11) Write a program to calculate the sum and average of a series of numbers. 12) What is the output of the following algorithm. FOR (n = 1, n <= 4, n + 1) DISPLAY “loop”, n ENDFOR 13) Design an algorithm and the corresponding flowchart for finding the sum of the numbers 2, 4, 6, 8, …, n 14) Using flowcharts, write an algorithm to read 100 numbers and then display the sum. 15) Write an algorithm to read two numbers then display the largest. 16) Write an algorithm to read two numbers then display the smallest 17) Write an algorithm to read three numbers then display the largest. 18) Write an algorithm to read 100 numbers then display the largest.