If-else Structure(programme of c)
If-else Structure(programme of c)
#include <stdio.h>
#include <stdlib.h>
//start of main function
int main()
{
//variable declaration
int x, y, min;
//get two integer numbers from user
printf("Enter two integers: ");
scanf("%d %d", &x, &y);
//find the minimum
if (x < y)
min = x;
else
min = y;
//print result
printf("Minimum is: %d\n", min);
return 0;
}
Comments
Post a Comment