answersLogoWhite

0


Best Answer

#include<stdio.h>

int main (void)

{

float x,y;

int z,w;

printf("enter a number:");

scanf("%6.2f",&x);

y=x/10.0;

z=x-y;

w=z%10;

printf("the rightmost digit is %d\n",w);

return 0;

}//main

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program the extracts and prints the rightmost digit of the integral portion of the float?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program WAP to print a given integer in the reverse order?

int n; // the number you want to reverse int rev_n = 0; while (n &gt; 0) { // shift rev_n digits left rev_n *= 10; // put rightmost digit of n onto right of rev_n rev_n += n % 10; // remove rightmost digit of n n /= 10; }


Which language do you use if you are creating an application to be deployed via a network?

Deployment methods are not integral to any programming language. You can use any suitable programming language to write the actual program, but how you deploy it is entirely up to you. However, there are installation tools that can assist with your deployment strategy.


Why is John von Neumann known as the father of the stored program computer?

Computer programs were originally considered to be an integral part of the machine while the data it operated on was separate. In 1945, John von Neumann proposed a new architecture such that the program and its data could be stored together on a mass storage medium (such as a hard disk drive), to be loaded into working memory (such as RAM), as and when it was required. This is the basis of all modern computers, thus John von Neumann is now regarded as being the father of the stored program computer.


__PROGRAM?

AI Program (artificial intelligence) maybe?


Write a program In java using while loop to reverse the digits of the number?

int n; // the number you want to reverse int rev_n = 0; while (n &gt; 0) { // shift rev_n digits left rev_n *= 10; // put rightmost digit of n onto right of rev_n rev_n += n % 10; // remove rightmost digit of n n /= 10; }

Related questions

Write FORTRAN90 program using gauss-quadrature rule?

you can finde integral with 4 gauss quadrature in book for meshfree writed by G.R.Liu after one chaper there is a program .in that is program that use gauss-quadrature for integral with fortran. excuse me for my bad writing.


Which report will you use most in managing your fleet program?

If your Program Administrator wants you to complete your portion of setting up your account, which portion do you complete?


Which report will you use often in managing your fleet program?

If your Program Administrator wants you to complete your portion of setting up your account, which portion do you complete?


What should commander schedule climate assessment as an integral part of?

Part of the EO program


The commander should schedule climate assessments as an integral part of what?

Part of the EO program


If your program administrator want you to complete your portion of setting up your account which portion do you complete?

Demographics


If you program administrator wants you to complete your portion of setting up your account which portion do you complete?

Demographics


What does the program WinZip do for the files on the computer?

It does unzip files, extracts folders and other things. You can just play around with it and find out what it does.


What is a code fragment?

a small portion of a computer program


How do you do the practical portion of a speech pathology program if you're doing an online degree?

There are several options to obtain the practical portion of a speech pathology program. Most of the programs are also connected to local colleges where the practical portion can be completed. Numerous options are available to attain the practical portion of a speech pathology program. You can go to a local college where the practical portion can be finished that is linked with your online school.


If your Program Administrator wants you to complete your portion of setting up your account which portion do you complete usnbank?

Contact information


What is snippet?

A code snippet is a small part of a computer program that shows how one portion of the program works.