Skip to content

Instantly share code, notes, and snippets.

@batmantec
Created February 6, 2016 01:51
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 batmantec/7f37e536c80780c3ca0e to your computer and use it in GitHub Desktop.
Save batmantec/7f37e536c80780c3ca0e to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
void star(int x){
int count=0;
do {
cout<<"*";
count++;
} while(count!=x);
cout << endl;
}
int main(){
int x,count,save;
cout<<"This program prints the number of * you ask to."<<endl;
cout<<"How many stars you want to make? ";
cin>>x;
star(x);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment