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

D letter pattern

parent 5c9fdce4
No related branches found
No related tags found
No related merge requests found
D.c 0 → 100644
/*D letter pattern
******
* *
* *
* *
* *
* *
* *
****** */
#include <stdio.h>
int main(){
int n;
printf("Enter the limit (prefer odd number):");
scanf("%d", &n);
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
if((j==1)||(i==1&&j<n)||(i==n&&j<n)||(j==n&&i>1&&i<n)){
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