Rabu, 27 Juni 2012

ZZZZzzzz...

#include<stdio.h>

#include<conio.h>

void main()

{

float A,B,C,D,E,F;

float Hasil1, Hasil2;

clrscr();

printf("Masukan Nilai A : ");scanf("%f",&A);

printf("Masukan Nilai B : ");scanf("%f",&B);

printf("Masukan Nilai C : ");scanf("%f",&C);

printf("Masukan Nilai D : ");scanf("%f",&D);

printf("Masukan Nilai E : ");scanf("%f",&E);

printf("Masukan Nilai F : ");scanf("%f",&F);

Hasil1 = A + B + C + D + E / F;

Hasil2 = (A + B + C + D + E)/ F;

printf("%5.2f + %5.2f + %5.2f + %5.2f + %5.2f / %5.2f = %5.2f \n",A,B,C,D,E,F,Hasil1);

printf("(%5.2f + %5.2f + %5.2f + %5.2f + %5.2f) / %5.2f = %5.2f \n",A,B,C,D,E,F,Hasil2);

getch();

}

1 komentar: