Created
February 6, 2016 01:51
-
-
Save batmantec/7f37e536c80780c3ca0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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