
ZeynepHW
Snippet options
Download: Download snippet as zeynephw.c.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!
#include<stdio.h> int main(){ while(1){ int n; printf("Please enter an even integer between 2 and 100 (inclusive) \n"); scanf("%d",&n); int i,j; for(i=1;i<=n;i++){ for(j=1;j<=3*n;j++){ if(i == j){ printf("\\"); } else if(i+j == 3*n + 1){ printf("/"); } else if(i>n/2){ if(j+i == 2*n + 1){ printf("/"); } else if(j-i == n){ printf("\\"); } else{ printf(" "); } } else{ printf(" "); } } printf("\n"); } } return 0; }
Create a free my code stock.com account now.
my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!
Find out more and register nowYou can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.