C Program to Print Two Integers (Entered by the User)
C Program to Print Two Integers (Entered by the User)
#include <stdio.h>
int main()
{
int x,y;
printf("\n Enter x and y value:");
scanf("%d%d",&x,&y);
printf("\n Display x and y values: %d %d",x,y);
return 0;
}
Output:
Enter x and y value:10 20
Display x and y values: 10 20
C Program to Print Two Integers (Entered by the User)
#include <stdio.h>
int main()
{
int x,y;
printf("\n Enter x value:");
scanf("%d",&x);
printf("\n Enter y value:");
scanf("%d",&y);
printf("\n Display x values: %d ",x);
printf("\n Display y values: %d ",y);
return 0;
}
Output:
Enter x value:10
Enter y value:20
Display x values: 10
Display y values: 20