4.2

Problem : Given a set of n students examination marks(in the range 0-100) make a count of the number of students that obtained each possible mark.
Penyelesaian dengan menggunakan dev c++ :

#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 a[100];
    for(int i=0; i<=100; i++){
        a[i]=i;
        cout<<"a["<<a[i]<<"] := a["<<a[i]+1<<"]"<<endl;
    }
    return 0;
}

untuk 4.3-4.4 buka di fafa145.blogspot.com 


Komentar

Postingan populer dari blog ini

Studi Case

Mencari titik tengah sebuah garis

Pemrograman Web Dinamis