Develop a program that reads a floating point number and then replace the right most digit of the integral part of the number?

1 answer

Answer

1021789

2026-07-08 08:55

+ Follow

/* program without if statement */

#include<stdio.h>

#include<conio.h>

void main()

{

int a,c;

float b;

clrscr();

printf("Enter the value \n");

scanf("%f",&b);

a=c;

c=a%10;

printf("the right most digit is %d",c);

getch();

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.