Skip to content

ryan-chew/Lab1-StarRecur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Lab1-StarRecur

#include using namespace std;

int star(static int rows) {

 int static rowCount = rows;
 int static starCount = 0;

 if (rowCount==0)
 {
	 return 0;
 }


 cout<<"*"; 
 starCount++; 
 if (starCount==rowCount)
 {
	 starCount=0;
	 cout<<endl; 
	 rowCount--; 
	 star(rowCount);
 }

 star(rows-1);

}

int main() {

star(12);

system("Pause"); 
return 0; 

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors