Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Largest value among three variables | C program

#include<stdio.h>
int main()
{
    int a,b,c;
    printf("Type first no: ");
    scanf("%d",&a);
    printf("Type second no: ");
    scanf("%d",&b);    
    printf("Type third no: ");
    scanf("%d",&c);        
    
    if(a >= b && a >= c)
        printf("%d is greater",a);
    else if(b >= a && b >= c)
        printf("%d is greater",b);
    else if(c >= a && c >= b)
        printf("%d is greater",c);
    return 0; 
}
Bhuvan Arora

No comments:

Amazing Deal !