0
Can anyone tell me where I am wrong(Solved)
This program reads the floating point no. and displays the right most value of the integral part. https://code.sololearn.com/cymkSQgnL8MC/?ref=app https://code.sololearn.com/cymkSQgnL8MC/?ref=app
2 Answers
+ 8
/*
%d is for integer type, so for float you need to use this %f
clrscr()
getch()
is turbo C which I don't recommend since its "discontinued integrated development environment and compiler for the C programming."
*/
#include <stdio.h>
int main() {
float p;
int a,e;
printf ("Enter the number");
scanf ("%f",&p);
a=p;
e=a%10;
printf ("The right most part is %d",e);
return 0;
}
+ 3
Thank you so much â€ïž đ