+ 1
Type conversion confusion
Look at the comented text below : #include <stdio.h> int main() { float average; int total = 23; int count = 4; #in this code. when we are not using float its output get change to 5.00 . Why...???? average = (float)total / count; printf("%4.2f", average); return 0; }
2 Antworten
+ 2
Oo.. ok. Thanks, i got it..😊
+ 1
Go through this...might help
#include <stdio.h>
int main() {
float average;
int total = 23;
int count = 4;
#in this code. when we are not using float its output get change to 5.00 . Why...????
average = (float)total / count;
printf("%4.2f", average);
return 0;
}