#include <iostream.h>
#include <conio.h>
int main()
{
int b, n,a;
long int hasil;
cout<<"Angka I : ";
cin>>n;
cout<<"Angka II : ";
cin>>a;
cout<<endl;
cout<<n<<" x "<<a<<" = ";
for(b=1;b<=a;b++)
{
hasil=hasil+n;
cout<<n<<" + ";
}
cout<<" = "<<hasil;
getch();
}
#include <conio.h>
int main()
{
int b, n,a;
long int hasil;
cout<<"Angka I : ";
cin>>n;
cout<<"Angka II : ";
cin>>a;
cout<<endl;
cout<<n<<" x "<<a<<" = ";
for(b=1;b<=a;b++)
{
hasil=hasil+n;
cout<<n<<" + ";
}
cout<<" = "<<hasil;
getch();
}
No comments:
Post a Comment