Answers for "write a c program to find maximum between two numbers"

C
0

c program for the largest of two numbers

/*Program for adding two numbers*/
#include <stdio.h>
int main(){
	int a, b;
    printf("Enter the first number: n"); //Prompts user to enter the first number.
    scanf("%d", &a);//Accepts input and saves it to variable a
    printf("Enter the second number: n");
    scanf("%d", &b);//Accepts input and saves it to variable a
    if (a > b){
    	printf("%d is greater than %d", a, b);
        }
    else
    	printf("%d is greater than %d", b, a);
}
Posted by: Guest on April-17-2021

Code answers related to "write a c program to find maximum between two numbers"

Code answers related to "C"

Browse Popular Code Answers by Language