Find larger value between two variable

Find larger value between two variable

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C programming concepts. You can learn C language at your own speed and time. One can learn concepts of C language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Find larger value between two variable
Find larger value between two variable

Write a C program to Find larger value between two variable

PROGRAM: Find larger value between two variable

/* Find larger value between two variable */

#include<stdio.h>
int main()
{
    int a,b;
    printf(“Enter value of a: “);
    scanf(“%d”,&a);
    printf(“Enter value of b: “);
    scanf(“%d”,&b);   
   
    if(a>b)
        printf(“A is larger”);
    else if(b>a)
        printf(“B is larger”);
    else
        printf(“A and B are equal”);
    return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *