C Programming : : Write a c program to find the biggest of given three numbers.

Posted on:
tags: ,

Q1: Write a c program to find the biggest of given three numbers.


#include<stdio.h>
#include<conio.h>
void main(){
int a,b,c;
clrscr();
                printf("\nEnter value for a:");
                scanf("%d",&a);
                printf("\nEnter value for b:");
                scanf("%d",&b);
                printf("\nEnter value for c:");
                scanf("%d",&c);

                if(a>b && a>c)
                {
                                printf("\nThe Greatest Number Is a:%d",a);

                }
                else
                {
                if(b>a && b>c)
                                printf("\nThe Greatest Number Is b:%d",b);

                else
                                printf("\nThe Greatest Number Is c:%d",c);


                }

                getch();
}

No comments:

Post a Comment

< >