Rumus penjumlahan dengan Array

Selasa, 03 April 2012

#include <iostream.h>
#include <conio.h>
void main (){

int a[20], b[20], c[20], x;
cout<<"mau berapa kali penjumlahan ?? : ";cin>>x;
for (int i=1;i<=x;i++)
{
cout<<"masukkan bil 1 :";cin>>a[i];
cout<<"masukkan bil 1 :";cin>>b[i];
c[i]=a[i]+b[i];

cout<<"Hasil jumlah   :"<<c[i]<<endl;
cout<<""<<endl;
}
getch();
}
Share this article :

0 komentar:

Speak up your mind

Tell us what you're thinking... !

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kunci Nemu - All Rights Reserved
Template Created by Creating Website Inspired by Sportapolis Shape5.com
Proudly powered by Blogger