code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3
Answer Posted / k
#include<iostream.h>
int main()
{int i,j,k;
for(i=1;i<=3;i++)
{cout<<"\n";
for(j=1;j<=3-i;j++)
cout<<" ";
for(k=i;k>0;k--)
cout<<i<<" ";
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain what are run-time errors?
What are Macros? What are its advantages and disadvantages?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
application attempts to perform an operation?
Write a program to use switch statement.
Explain output of printf("Hello World"-'A'+'B'); ?
What is function in c with example?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
What is stack in c?
What are the types of data types and explain?
Explain how can I avoid the abort, retry, fail messages?
What are different types of variables in c?
how to create duplicate link list using C???
What is .obj file in c?