Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to give following output.....
*********
**** ****
*** ***
** **
* *
** **
*** ***
**** ****
*********

Answer Posted / monty

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
for(a=1;a<10;a++)
{
for(b=1;b<10;b++)
{
if((a==2 && b==5) ||
(a==3 && (b==4 || b==5 || b==6) )
||
(a==4 && (b>=3 && b<=7) )
||
(a==5 && (b>=2 && b<=8) )
||
(a==6 && (b>=3 && b<=7) )
||
(a==7 && (b==4 || b==5 || b==6) )
||
(a==8 && b==5))
printf("-");
else
printf("*");
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Function calling procedures? and their differences? Why should one go for Call by Reference?

1057


Explain main function in c?

1052


Can you think of a logic behind the game minesweeper.

2426


what is the syallabus of computer science students in group- 1?

2280


How do you view the path?

1087


What is the explanation for modular programming?

1160


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4639


write a progrmm in c language take user interface generate table using for loop?

2008


Differentiate between null and void pointers.

1131


Write a program to print all permutations of a given string.

1144


What is a structure in c language. how to initialise a structure in c?

1032


List the difference between a While & Do While loops?

1059


What is the difference between scanf and fscanf?

1211


What are dangling pointers in c?

1143


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2378