Showing posts with label diagonal start and zero rectangle. Show all posts
Showing posts with label diagonal start and zero rectangle. Show all posts

8.23.2013

Diagonal Star and Zero Rectangle

Q. Write a C program to print the following diagonal star and zero rectangle structure as:

*000000
0*00000
00*0000
000*000
0000*00
00000*0
000000*

Ans.

/*c program for diagonal star and zero rectangle*/
#include<stdio.h>
int main()
{
 int rows=7,r,c;