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 the files which are automatically opened when a c file is executed?
Write code for finding depth of tree
What is a #include preprocessor?
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.
plz let me know how to become a telecom protocol tester. thank you.
What is character set?
SRUCTURE PROGRAMMING
What is multidimensional arrays
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
If input is 123 then how to print 100 and 20 and 3 seperately?
What is volatile variable how do you declare it?