Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- main()
- {
- int n,k,a,p=0;
- cin >> n >> k;
- for(a=1; a<=n; a++){
- if(a==k+p){
- cout << "* ";
- p+=k;
- }else{
- cout << a << " ";
- }
- }
- cout << "\b" <<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement