Write a C program to read a value from the user and display the value.
- Start
- Include necessary header files: stdio.h.
- Declare a character variable 'a' to store the value.
- Prompt the user to input a symbol using scanf.
- Print the entered value using printf.
- End
#include <stdio.h>
int main()
{
int a = 20;
scanf("%d",&a);
printf("%d" , a);
return 0;
}
Thus, a C program has been written to read a value from the user and display the value.