boss alisin mo na si value 3
boss alisin mo na si value 3
ayaw boss hahaoo boss kahit wala yan ok lang
haha dibale boss salamat ng marami .same boss 0.00 din sakin pag c hahaha
Not exactly,huwag kang gumamit ng float. mas malaki ang allocation niya compared sa int.
int n = 190;
while(n >= 181)
printf("%d%c", n," ");
n--;
)
paki linaw po ang division. ang ba gusto mong output talaga?
#include <stdio.h>
int main(void) {
printf("Sizeof int: %d\n", sizeof(int));
printf("Sizeof float: %d\n", sizeof(float));
printf("Sizeof double: %d\n", sizeof(double));
return 0;
}
solve ko na problem mo. pero magkaiba ang output. saan galing ang 7.49 mo.haha dibale boss salamat ng marami .
pano kaya to haha
#include <stdio.h>
int main(void) {
double DIVIDEND = 190;
double DIVISOR = 181;
double quotient = DIVIDEND;
printf("\nProgram that divides number from 190 to 181\n");
printf("===========================================\n");
while (DIVIDEND>DIVISOR) {
quotient /= --DIVIDEND;
}
printf("\nFINAL QUOTIENT (expressed in exponent form): %0.30lg\n", quotient);
printf(" ----------------------------------\n");
printf("\nFINAL QUOTIENT (expressed in decimal form): %0.30lf\n", quotient);
printf(" ----------------------------------\n");
return 0;
}
Thankyou boss Ng maramiEto sample code, it displays the quotient in both exponent and decimal form. Sa exponent form, it shows the value: 7.4918451579688896171440390924e-19
C:#include <stdio.h> int main(void) { double DIVIDEND = 190; double DIVISOR = 181; double quotient = DIVIDEND; printf("\nProgram that divides number from 190 to 181\n"); printf("===========================================\n"); while (DIVIDEND>DIVISOR) { quotient /= (DIVIDEND-1); DIVIDEND--; } printf("\nFINAL QUOTIENT (expressed in exponent form): %0.30lg\n", quotient); printf(" ----------------------------------\n"); printf("\nFINAL QUOTIENT (expressed in decimal form): %0.30lf\n", quotient); printf(" ----------------------------------\n"); return 0; }
solve ko na problem mo. pero magkaiba ang output. saan galing ang 7.49 mo.
Reverse loop po din magdidivide ang loop at ilabas ang quotient example po ang loop ispakilagay na lang question galing sa professor/professora niyo para maliwanagan kaming lahat.
To put it more accurately, 7.4918^-19 which is 7.4918 preceded by decimal 19 zeros.Reverse loop po din magdidivide ang loop at ilabas ang quotient example po ang loop is
190 to 181
190/189/188/187/186/185/184/183/182/181=(quotient).
Pagpinagdivide mo boss Yan using calculator lalabas 7.4918.. and so on . Using while loop