Wednesday 22 August 2012

Greatest value between Three Numbers


#include <stdio.h>
#include <conio.h>

void main()
{
                int a,b,c;
                clrscr();

                printf("Enter the A number : ");
                scanf("%d",&a);

                printf("Enter the A number : ");
                scanf("%d",&b);

                printf("Enter the C number : ");
                scanf("%d",&c);

                if(a>b)
                {
                                if(a>c)
                                {
                                                printf("A is the greatest Number.");
                                }
                }
                else
                {
                                if(b>c)
                                {
                                                printf("B is the greatest Number.");
                                }
                                else
                                {
                                                printf("C is the greatest Number.");
                                }
                }
                getch();
}

1 comments:

  1. Hi there to every one, it's genuinely a pleasant for me to visit this web
    site, it consists of precious Information.

    Feel free to surf to my blog post - minecraft free

    ReplyDelete