Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void star(int x){
  5. int count=0;
  6. do {
  7. cout<<"*";
  8. count++;
  9. } while(count!=x);
  10. cout << endl;
  11. }
  12.  
  13. int main(){
  14. int x,count,save;
  15. cout<<"This program prints the number of * you ask to."<<endl;
  16. cout<<"How many stars you want to make? ";
  17. cin>>x;
  18. star(x);
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement