Skip to content

17Hieng/Console_Triangle_CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console_Triangle_CPP

Draw triangle in console with C++ Program

Pseudocode

START

declare n,u
OUTPUT "ENTER max width of triangle"
input n

FOR i=1 to n*2 
	IF i < n
		u = i
	ELSE
		u = n - (i - n)
	ENDIF

	FOR j=1 to u 
		OUTPUT "*"
	ENDFOR

	OUTPUT "\n"
ENDFOR

END

License: MIT

About

Draw triangle in console with C++ Program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages