Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answer Posted / manoj
void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=1; j<i; j++){
printf(" *");
}
}
}
| Is This Answer Correct ? | 8 Yes | 13 No |
Post New Answer View All Answers
Why we use void main in c?
write a c program to find the sum of five entered numbers using an array named number
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
What is the correct code to have following output in c using nested for loop?
Is c high or low level?
Why C language is a procedural language?
Do you know the difference between malloc() and calloc() function?
Does c have circular shift operators?
What is the difference between printf and scanf )?
Are bit fields portable?
can any one tel me wt is the question pattern for NIC exam
Write a program to generate the Fibinocci Series
What is the use of ?: Operator?
Is c pass by value or reference?
What does main () mean in c?