Y I can't perform the operation c=(++b)/(++a)in this prgrm... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Y I can't perform the operation c=(++b)/(++a)in this prgrm...

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

21st Jan 2018, 2:09 PM
Deepak Bhalode
Deepak Bhalode - avatar
5 Answers
+ 2
dt line? and to my understanding of printf, as the parameter of the method, you state your message as a string and include the type of the variable that will be printed then you actually provide the method with the variable you want to print. The variable takes the place of the type you have stated, hence why c is neededm To be honest I have only used it myself once in Java so I need to gain a solid understanding of it.
21st Jan 2018, 2:56 PM
Tarantino
Tarantino - avatar
+ 1
That line isn’t causing the problem: printf ("the value of c is %d"); Is. You forgot to put c in that line: printf ("the value of c is %d", c);
21st Jan 2018, 2:16 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 1
printf ("the value of c is %d",c); Which returns 1 which is to be expected as 3/2 = 1 (Integer division )
21st Jan 2018, 2:19 PM
Tarantino
Tarantino - avatar
+ 1
wats the concept behind putting c into dt line...I m sm times confused in it...
21st Jan 2018, 2:46 PM
Deepak Bhalode
Deepak Bhalode - avatar
+ 1
I hv to knw the concepts? ...fr putting c there in dt line
21st Jan 2018, 3:51 PM
Deepak Bhalode
Deepak Bhalode - avatar