Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement