Created
February 16, 2016 17:14
-
-
Save alonzoibarra97/746f29665892e3b2307a to your computer and use it in GitHub Desktop.
quiz2.2.cpp
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> | |
#include <cstdlib> | |
int stars (int a, int cont=0) | |
{ | |
int st; | |
do{ | |
std::cout <<"*"; | |
cont++; | |
}while (a > cont); | |
} | |
using namespace std; | |
int main() { | |
int st,a, cont=0; | |
cout<< "Give me a number to print *\n"; | |
cin>> a; | |
st= stars(a); | |
cout << st; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment