How do you make two numbers divide . I am trying to make a calculator with functions . It's in C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you make two numbers divide . I am trying to make a calculator with functions . It's in C

https://code.sololearn.com/c3FLRk7sqxTh/?ref=app

10th Sep 2018, 8:53 AM
Aditya Prasad
Aditya Prasad - avatar
4 Answers
0
use %f instead of %d to print out floats
10th Sep 2018, 8:58 AM
hinanawi
hinanawi - avatar
0
ok idid that but now the inputs that give are been printed as 0.000000 and 0.000000
10th Sep 2018, 9:00 AM
Aditya Prasad
Aditya Prasad - avatar
0
Aditya Prasad really? when i input "5 2" the results are "5 * 2 = 10" and "5 / 2 = 2.500000" make sure the numbers you input are separated by spaces
10th Sep 2018, 9:03 AM
hinanawi
hinanawi - avatar
0
no problem now . sorted it out . thanks for the help btw
10th Sep 2018, 9:03 AM
Aditya Prasad
Aditya Prasad - avatar