Can anyone tell me where I am wrong(Solved) | Sololearn: Learn to code for FREE!

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

c

4/8/2021 2:58:06 PM

SUKHBEER SINGH

2 Answers

New Answer

+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 ❤️ 👍