Here we are going to see how to take user input in C Programming Language.
Â
#include <stdio.h>
void main()
{
int a, b;
printf("Enter the values for a and b:\n");
//Taking user input using scanf function
scanf("%d %d", &a, &b);
printf("The value of a is: %d\n", a);
printf("The value of b is: %d\n", b);
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP