Business

Greater And Smaller Value Calculator Program For C Programing

Here is the code of c program, to find smaller and greater value from 2 integers

#include<stdio.h>
#include<conio.h>
int main()
{
    int val1,val2,res;
    printf("Enter values one by one\n");
    printf("\nValue 1:");
    scanf("%d",&val1);
    printf("\nValue 2:");
    scanf("%d",&val2);
    if(val1>val2)
    printf("Value 1 is greater");
    else
    printf("Value 2 is greater");
    getch();
   
}

Hey there, I'm Najam!

Share This Post

Comments

    Blogger Comment

0 comments:

Post a Comment