I am an absolute beginner to C programming.
I need help with this program. Please help. Thanks in advance.
Here is the problem.
Enter a float number. Print the last digit of the integer part of the number.
Below is the code I wrote. But I am getting an error saying "syntax error before int"
Code:#include <stdio.h> #include <conio.h> void main() { float a; int b,last; printf ("value: "); scanf ("%f", &a); b = int(a); last = b%10; printf ("%d", last); getch(); }