Read 2 numbers. If first is larger than second, display second, else display first.
That's for the smallest. For the largest reverse the two.
For each of the other two, it's easier to just create a variable, call it largest. Initialize it to a very small number, say -1. As you read each number, compare it to largest. If the number is larger than largest, set largest equal to the number. When you finish each list of numbers, then print largest.
Best answer
Read 2 numbers. If first is larger than second, display second, else display first.
That's for the smallest. For the largest reverse the two.
For each of the other two, it's easier to just create a variable, call it largest. Initialize it to a very small number, say -1. As you read each number, compare it to largest. If the number is larger than largest, set largest equal to the number. When you finish each list of numbers, then print largest.
Design step by steps algorithm on how to write the letter A and display the result
please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.
1.Start Algorithm 2.Enter first number 3.Enter second number 4.Enter third number 5.Enter fourth number 6.Enter fifth number 7.Add five number 8.display five number / 2 9.Display result 10.End Algorithm
maybe
1. Design an algorithm to compute sum of the squares of n numbers?
You can write out this algorithm. This will then be programmed into the device to make determining prime numbers easier.
das
n=100 loop until n = 9 print n n = n -1 end loop
Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.
jgfujtf
Max = 0For K = 1 to NIf Number(K) > Max then Max = Number(K)Next KPrint Max
10001/999900