Hi,
I am having some problems with my code. I am trying to read characters from scanf. What happens is that it doesnot read the whole character it read only 1 character. I tried making a loop but it keeps giving me errors.
Code:#include <stdio.h> #include <stdlib.h> int main() { char c; float i; int number; float f =50; scanf("%c", &c); number = atoi(c); i=f+(float)number; printf("%f",i ); return 0; }