Algorithm Step1: Read A, B, C Step2: If A > B is True, then check whether A > C, if yes then A is greatest otherwise C is greatest Step3: If A > B is False, then check whether B > C, if yes then B is greatest otherwise C is greatest Give the Flowchart Answer
draw a flowchart to find the biggest number among the 3 numbers
identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.
To find greatest of 3 digits in one line #includ<stdio.h> #include<conio.h> void main() { int a,b,c; printf("enter a,b,c:); scanf("d%d%d",&a,&b,&c); printf("greatest no: %d"(a>b)?((a>c)?a:c):((c>b)?c:b)); printf("have a nice day"); getch(); }
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
Oh, well, simply: max = (a + b + c * 2 + abs(a - b) + abs(a + b - c * 2 + abs(a - b))) / 4;
dim a,b,c a=cint(inputbox("enter value for a")) b=cint(inputbox("enter value for b")) c=cint(inputbox("enter value for c")) if((a>b)and(a>c)) then msgbox "greatest number is a="&a else if ((b>a)and(b>c)) then msgbox "greatest number is b="&b else msgbox "greatest number is c="&c end if end if
Algorithm Step1: Read A, B, C Step2: If A > B is True, then check whether A > C, if yes then A is greatest otherwise C is greatest Step3: If A > B is False, then check whether B > C, if yes then B is greatest otherwise C is greatest Give the Flowchart Answer
draw a flowchart to find the biggest number among the 3 numbers
The greatest factors of A, B, and C, respectively, are the absolute values of A, B, and C. The greatest common factor of A, B, and C is 1.
greatest = std::max (a, std::max(b, c));
The greatest common factor of these terms is 14c2d.14(c^2)dThe GCF of 14 and 42 is 14.The GCF of (c^2)d and (c^3)d is (c^2)d.
public class FindLeastAndGreatest { public static void main(String[] args) { // number can't be equal with each other int a = 7; int b = 7; int c = 6; System.out.println(least(a,b,c)); System.out.println(greatest(a,b,c)); } public static int least(int a, int b, int c) { int least = 0; if(a < b && a < c) { least = a; } else if(b < a && b < c) { least = b; } else { least = c;} return least; } public static int greatest(int a, int b, int c) { int greatest = 0; if(a > b && a > c) { greatest = a; } else if(b > a && b > c) { greatest = b; } else { greatest = c;} return greatest; } }
Since C can be any number, the answer can be any factor of 60.
identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.
Numbers are a, b and c; b = a + 2, c = a + 4. Find a such that a = b + c, ie a = (a + 2) + (a + 4) so a = 2a + 6 making a = -6, b = -4 and c = -2
The greatest such number is 1. If n is such a number, then 6168 = an + r 2447 = bn + r, and 3118 = cn + r for some integers a, b, c and r. This means that 6168 - 2447 = 3721 = (a-b)n 6168 - 3118 = 3050 = (a-c)n, and 3118 - 2447 = 671 = (c-b)n That is, n is the greatest common factor of 3721, 3050 and 671. But the GCF of these numbers is 1. Hence the answer.