Wednesday, October 13, 2010

Bilangan dan perkalian Matrix C++

Contoh bilangan matrix :

//---------------------------------------------------------------------------//

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
        cout << "\n";
        int A[5] = { 1, 12, 123, 1234,12345 };
        int BIL;

        for (int N=0; N<5; N++) {
        cout<<A[N]<<endl;
     }
  cout<<endl;
}

//--------------------------------------------------------------------------//

Hasil output akan seperti ini :



Contoh Perkalian :

//-----------------------------------------------------------------------------------------//

#include <stdio.h>

int main()
{
        int i;
        printf ("\n1 + 3 + 5 + 7 + 9 = %d\n\n", 1 + 3 + 5 + 7 + 9);
}

//-----------------------------------------------------------------------------------------//

Hasil output akan seperti ini :


1 comments:

dafnievalent said...

Hotels near Casino Vegas, NV - Mapyro
Find hotels near Casino Vegas in Las 나주 출장샵 Vegas, 성남 출장마사지 NV near Reno-Tahoe Casino, 아산 출장마사지 Hotel. Find reviews and discounts for AAA/AARP 경기도 출장마사지 members, 의왕 출장샵 seniors,