answersLogoWhite

0

To get decimal places use the float data type instead of the int data type. For example:

int number;

is replaced with :

float number;

To display the float using printf use the formatting code %f:

printf("%f",number);

OR:

printf("%f",1.11);

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Explanation of how to write decimals in standard form?

Explain write ing decimals in Standard Form = (In number format like this... EXAMPLE: Two and two tenths is, (IN STANDARD FORM : 2.2) !


How do you change the pre-recorded sound on something like the Staples Easy Button to different sound of your choice from the computer?

You would have to use a command script program, and write a program that could be programmed into the micro processing chip inside. Using a program like Visual Basic.


How do you write fifteen thousand and one hundred thirteen thousandths in decimals?

like this 15,000.113


The command used to execute a BASIC programme?

Assuming a BASIC program is loaded into memory, the correct command to execute a BASIC program is: RUN. If you would like to start your program at a particular point in the execution, you may use RUN [#], where [#] is the line number you would like to start execution at.


How run smaco program of system program in C language?

To run a system program in C using the system() function, you first need to include the stdlib.h header. You can then call system("command"), replacing "command" with the shell command you want to execute. For example, system("ls") will list the files in the current directory. Compile your program with a C compiler (like gcc), and then execute the compiled binary to run the command.


How do you convert 13.4 in decimals?

Oh, dude, converting 13.4 to decimals is a piece of cake! Wait, isn't it already in decimals? I mean, it's not like we're dealing with fractions here. So, like, 13.4 is already in decimal form, unless you want to get super technical and write it as 13.40. But, like, who has time for that?


What are the decimals between 0.1 through 011?

There is an infinite amount of decimals between 0.1 and 0.11. Write "0.10", and then add any digit or digits you like - the result will be between those two.


How to write pi in LaTeX?

To write pi in LaTeX, you can use the command pi within a math environment like this: pi.


What is difference between stop and end in GWbasic?

The end command is used to end the program whereas the stop command is used to break the loop like ctrl+c. After running the program it will come as break in 20 or whatever


How do you evaluate a physical education program?

You have to write a later stating that you would like to evaluate a physical program.


Convert the unlike decimals into like decimals?

Easy


What command should be given to compile a C program from the command prompt?

You need a compiler. Gcc or g++ can be run from a unix shell, or a windows implementation of one like cygwin.