1. READ the values of 3 numbers A, B and C
2. IF the value of A>that of B THEN
GOTO step 3
ELSE
GOTO step 4
ENDIF
3. IF the value of A>that of C THEN
PRINT "The maximum value is that of A"
GOTO step 5
ELSE
GOTO step 4
ENDIF
4. IF the value of B>that of C THEN
PRINT "The maximum value is that of B"
GOTO step 5
ELSE
PRINT "The maximum value is that of C"
GOTO step 5
ENDIF
5. STOP processing
Chat with our AI personalities
Sure thing, honey! Here's a sassy pseudo code for ya:
biggest_number = max(num1, num2, num3)
print(biggest_number)
That's all you need, darling! Just compare those three numbers and pick out the biggest one like a boss.
Oh, what a wonderful question! Let's paint a happy little pseudo code together. To find the biggest of three numbers, you can start by setting a variable to the first number. Then, compare it to the second number and if it's bigger, update the variable. Finally, compare this variable to the third number and update it if needed. Remember, there are no mistakes in pseudo code, just happy little accidents!
Sure, here is a simple pseudo code to find the biggest of three numbers:
Input: num1, num2, num3
If num1 is greater than num2 and num1 is greater than num3:
Output num1 as the biggest number
Else if num2 is greater than num1 and num2 is greater than num3:
Output num2 as the biggest number
Else:
Output num3 as the biggest number
This pseudo code compares the three numbers and determines the biggest among them based on the conditions provided.
begin,
numeric: num 1, num 2, num 3.
accept: num 1, num 2, num 3.
case 1,
if, num 1 > num 2 and num 1 > num 3
display num 1 is greater.
break.
case 2,
if, num 2 >num 3 and num2 > num 1
display num 2 is greater.
break
els,,
num 3 is greater.
end.
you can also have the complete code here http://techtutorz.blogspot.in/2014/04/code-to-find-greatest-number-from-user.html
num1% = 0
num2% = 0
num3% = 0
highestNum% = 0
CLS
PRINT "PROGRAM: Find the highest number"
INPUT "Enter the first number: ", num1%
highestNum% = num1%
INPUT "Enter the second number: ", num2%
IF num2% > highestNum% THEN highestNum% = num2%
INPUT "Enter the third number: ", num3%
IF num3% > highestNum% THEN highestNum% = num3%
PRINT "The largest number you entered was: "; highestNum%
END
The 'c' program to input three numbers and display the maximum number is
#include<stdio.h>
#include<conio.h>
void main()
{;
int a,b,c;
clrscr();
printf("enter the value for a,b & c\n");
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c)
printf("\na is the maximum number");
else if(b>a&&b>c)
printf("\nb is the maximum number");
else
printf("\nc is the maximum number");
getch();
}
Implement this method in Java, passing in the three numbers taken in through the Scanner class:
public static void showLargest(int a, int b, int c) {
if(a > b && a > c) {
System.out.println(a);
}
else if(b > c) {
System.out.println(b);
}
else {
System.out.println(c);
}
}
Algorithm: largest_of_three is:
Input: numeric values a, b and c
Output: largest value of a, b and c
let max be a
if b is greater than max then let max be b
if c is greater than max then let max be c
return max
function requestedFunction(a,b,c) { document.write("Largest number:" + Math.max(a,b,c) + "
Sum of numbers:" + (a+b+c)) }
draw a flowchart to find the biggest number among the 3 numbers
Or even three. Actually, pseudo-code has no rules.
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
start input A & B if A>B print A is greatest if B>A print B is greatest stop james ola writes.....SOT.
(defun max3 (a b c) (cond ((> a b) (cond ((> a c) a) (t c))) ((> b c) b) (t c) ) )