How to Make Big Plus Sign using C


It’s very easy. So, let’s see this one.

#include <stdio.h>

#include <stdlib.h>

int main()

{

int i,j,n,k;

printf(“input your number, it must be odd : “);scanf(“%d/n”,&n);

k=(n/2)+1;

for (i=1;i<=n;i++)

{

for (j=1;j<=n;j++)

{

if ((i==k) or (j==k))

{

printf(“*”);

}

else

{

printf(” “);

}

}

printf(“\n”);

}

system(“pause”);

return 0;

}

Is it easy, isn’t it?? So, I am sure you can do it alone….

Iklan

Tinggalkan Komentar

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s