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
Code for Method of Handling Factorials of Any Size?
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
1+1/2!+1/3!+...+1/n!
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.
Code for Easily Using Hash Table?
Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.
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
i don't know about working of nested for loop can any one help me
can you please write a program for deadlock that can detect deadlock and to prevent deadlock.
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
how to write a program that opens a file and display in reverse order?
Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.
write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation