Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answer Posted / prasanna
#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,j;
printf("enter the lines:");
scanf("%d",&n);
for(i=1;i<=n/2;i++)
{
printf("/n");
for(j=1;j<=2*i;j++)
printf("\n");
}
if(n%2!=0);
printf("\n");
getch();
}
| Is This Answer Correct ? | 10 Yes | 8 No |
Post New Answer View All Answers
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What are the benefits of organizational structure?
What is the benefit of using an enum rather than a #define constant?
Why is C language being considered a middle level language?
What do you mean by recursion in c?
What is New modifiers?
Can you pass an entire structure to functions?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
How do I round numbers?
Can you please explain the difference between strcpy() and memcpy() function?
Write a program with dynamically allocation of variable.
is it possible to create your own header files?
How can variables be characterized?
What is scope rule of function in c?