Skip to content

Instantly share code, notes, and snippets.

@josikie
Created November 9, 2019 23:19
Show Gist options
  • Save josikie/9db8532ed9e3d63edff1827688c0d86d to your computer and use it in GitHub Desktop.
Save josikie/9db8532ed9e3d63edff1827688c0d86d to your computer and use it in GitHub Desktop.
Perkalian 1 - 100 Menggunakan C++
#include <iostream>
using namespace std;
int main()
{
cout << " PERKALIAN 1-10 "<<endl;
int x=1;
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
for (x=2;x<3;x++)
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
for (x=3;x<4;x++)
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
for (x=4;x<5;x++)
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
for (x=5;x<10;x++)
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
for (x=10;x<11;x++)
cout << " " << x << " " << " " << x*1 << " " << " " << x*2 << " " << " " << x*3 << " " << " " << x*4 << " " << " " << x*5 << " " << " " << x*6 << " " << " " << x*7 << " " << " " << x*8 << " " << " " << x*9 << " " << " " << x*10 << " " <<endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment