Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vikram sharma
<?php
for($i=0;$i<10;$i++){
for($j=0;$j<=$i;$j++){
if($i%2!=0 || $i==0 || $j==1)
echo"*";
}
echo"</br>";
}
?>
Is This Answer Correct ? | 7 Yes | 12 No |
What are advantages and disadvantages of recursive calling ?
12 Answers College School Exams Tests, Evolving Systems, HP, Jyoti Ltd, Sage, Wipro,
Are there constructors in c?
How are structure passing and returning implemented?
Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 2. Enter alphanumeric characters and form 2 array alphaets and digits.Also print the count of each array.
Write a program to print the following series 2 5 11 17 23 31 41 47 59 ...
What’s a signal? Explain what do I use signals for?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Differentiate between static and dynamic modeling.
What is && in c programming?
write a c program to find the roots of a quadratic equation ax2 + bx + c = 0
11 Answers CSC, St Marys, TATA,
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort
how do you programme Carrier Sense Multiple Access