Skip to content

Instantly share code, notes, and snippets.

@dihardmg
Last active November 10, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dihardmg/84085fcc0efee250a11442cb13e77a22 to your computer and use it in GitHub Desktop.
Save dihardmg/84085fcc0efee250a11442cb13e77a22 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
int i = 1, x, y;
cout<<"\n Masukkan angka kelipatan : "; cin>>y;
cout<<"\n Masukkan angka batas : "; cin>>x;
while (i <=x) {
if( i % y !=0)
cout << i <<" ";
else cout << "* ";
i++;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment