Sunday, March 19, 2023

"find the gretest number between three numbers " in c programming .

 //find the gretest number between three numbers

#include <stdio.h >
int main (){
    int a,b,c;
    printf ("enter three numbers :");
    scanf ("%d%d%d",&a,&b,&c);
    if (a>b && b>c){
        printf ("%d is the gretest number",a);
    }
    else if (b>c&&c>a){
          printf ("%d is the gretest number",b);
    }
    else if (c>a&&a>b){
          printf ("%d is the gretest number",c);
    }
    else {
        printf ("all numbers are equal");
    }
    return 0;
}

No comments:

Post a Comment

print a multiplication table of any integer taking from user

 // print a multiplication table of any integer taking from user  #include "stdio.h" int main () { int n,mul,i; printf ("...