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
1+1/2!+1/3!+...+1/n!
how to write a program that opens a file and display in reverse order?
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
write a program using virtual function to find the transposing of a square matrix?
write a program that reads a series of strings and prints only those strings begging with letter "b"
Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.
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.)
what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }
Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?
How to swap two ASCII numbers?