Sabtu, 16 April 2016

DIKTAT BAB 7 KASUS 6.2

Mencari nilai rata-rata:

programnya:
#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
    int tgs1, tgs2, tgs3;
float rata, varian, deviasi;
cout<<"Masukkan nilai Tugas Pertama =";
cin>>tgs1;
cout<<"Masukkan nilai Tugas Kedua= ";
cin>>tgs2;
cout<<"Masukkan nilai Tugas Ketiga= ";
cin>>tgs3;
rata=(tgs1+tgs2+tgs3)/3;
cout<<"Nilai Rata - Rata = "<<rata<<endl;

    return 0;
}

Hasil programnya:

SELAMAT MENCOBA :)

Unknown

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 komentar:

Posting Komentar