Contoh Program Penjumlahan Dan Pengurang
Contoh Program Penjumlahan Dan Pengurang
Contoh Program Penjumlahan Dan Pengurang
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
#include<iomanip.h>
main()
clrscr();
cout<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
cout<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
cout<<endl<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
cout<<setiosflags(ios::right)<<setw(10)<<a[br][kl];
cout<<endl;
cout<<endl<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
cout<<setiosflags(ios::right)<<setw(10)<<b[br][kl];
cout<<endl;
}
cout<<endl<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
c[br][kl]=a[br][kl]+b[br][kl];
cout<<setiosflags(ios::right)<<setw(10)<<c[br][kl];
cout<<endl;
cout<<endl<<endl;
for(br=1;br<=jml_br;br++)
for (kl=1;kl<=jml_kl;kl++)
c[br][kl]=a[br][kl]-b[br][kl];
cout<<setiosflags(ios::right)<<setw(10)<<c[br][kl];
}
cout<<endl;
cout<<endl;
puts(" S E L E S A I ");
getch();