Display Pattern:
1
2 3
4 5 6 7
8 9 10 11 12 13 14 15
…
Answer Posted / gowtham
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,s=0;
clrscr();
printf("Enter n value:");
scanf("%d",&n);
for(i=0;i<=8230;i++)
{
s=s+1;
}
printf("%d",s);
getch();
}
| Is This Answer Correct ? | 3 Yes | 10 No |
Post New Answer View All Answers
how to diplay a external image of output on winxp by using c & c++,
write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?
i don't know about working of nested for loop can any one help me
How to swap two ASCII numbers?
How can I Draw an ellipse in 3d space and color it by using graph3d?
U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133…139,213,313,…913 all these will be counted)
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
1+1/2!+1/3!+...+1/n!
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
write a program using virtual function to find the transposing of a square matrix?
Code for Method of Handling Factorials of Any Size?
How to Split Strings with Regex in Managed C++ Applications?
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)