Skip to content
Snippets Groups Projects
Commit 18cc6e4d authored by PRANAV VIKRAMAN's avatar PRANAV VIKRAMAN
Browse files

Left-triangle pattern

parent ded2249a
No related branches found
No related tags found
No related merge requests found
/*Left-triangle pattern
*
**
* *
* *
* *
* *
* *
* *
********* */
#include <stdio.h>
int main(){
int n;
printf("Enter the limit: ");
scanf("%d", &n);
for(int i=1; i<=n; i++){
for(int j=n; j>=1; j--){
if((i==j)||(i==n&&j<=n)||(j==1)){
printf("*");
} else{
printf(" ");
}
}
printf("\n");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment