#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the three numbers: ");
scanf(%d%d%d:,&a&b&c);
if(a>b | a>c)
{
printf("the greatest no: is %d",a);
}
if(b>c)
{
printf("the greatest no: is %d",b);
}
else
{
printf("the greatest no: is %d",c);
}
getch();
}
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.
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.
design a flowchart that will input three numbers and get their sum. If the sum is greater than 20, then print "sum>20",else print the sum.
#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter any three numbers"); scanf("%d%d%d",&a,&b,&c); if(a>b&&a>c) printf("A is greatest"); else if(b>a&&a>c) printf("B is greatest"); else if(c>a&&c>b) printf("C is greatest"); if(a<b&&a<c) printf("A is smallest"); else if(b<a&&b<c) printf("B is smallest"); else if(c<a&&c<b) printf("C is smallest"); getch(); }
# include<stdio.h> main() { int a,b,c; print f("enter the values of a,b,c"); scan f("%d%d%d",&a,&b,&c); if((a>b)&&(a>c)) print f("Greatest value is a =%d",a); else if((b>a)&&(b>c)) print f("Greatest value is b=%d",b); else print f("Greatest value is c=%d",c); }
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.
Any three.
The sum of the three greatest prime numbers that are less than 39 is 97.
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
N = x If y < N then N = Y If z < N then N = z Print N
63, 18 and 9
The greatest common factor for the numbers 3 and 37 is 1.
The answer is 998.
The numbers three and five have the greatest common factor of one.
Here's a simple C program that prompts the user for three decimal numbers, converts them to integers, and prints the trimmed integer values: c Copy code #include int main() { double num1, num2, num3; // Prompt the user for three decimal numbers printf("Enter three decimal numbers: "); scanf("%lf %lf %lf", &num1, &num2, &num3); // Convert and print the trimmed integer values int intNum1 = (int)num1; int intNum2 = (int)num2; int intNum3 = (int)num3; printf("Trimmed integer values: %d, %d, %d\n", intNum1, intNum2, intNum3); return 0; } In this program: We declare three variables num1, num2, and num3 to store the decimal numbers entered by the user. We use printf to prompt the user to enter three decimal numbers. We use scanf to read and store the user's input in the variables num1, num2, and num3. We then convert these decimal numbers to integers by casting them using (int) and store them in intNum1, intNum2, and intNum3. Finally, we use printf again to print the trimmed integer values. Compile and run the program, and it will prompt you for three decimal numbers and print their trimmed integer values as requested.