Display Pattern:
1
2 3
4 5 6 7
8 9 10 11 12 13 14 15
…
Answers were Sorted based on User's Feedback
Answer / 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 |
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
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 calculate the radius for a quadratic equation use modular programming(function abitraction)hint use quadratic function
1 Answers ICAN, Jomo Kenyatta University,
How do I store linked list datas into an array?
Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …
Write code for the multiplication of COMPLEX numbers?
Write an algorithm that receives a string and reverses it.
#include<iostream.h> //main() //{ class A { friend class B; public: void read(); }; class B { public : int a,b; }; void A::read() { cout<<"welcome"; } main() { A x; B y; y.read(); } In the above program......, as B is a friend of A B can have access to all members,i cant access y.read . could you please tell me the reason and what would i code to execute this program?
i don't know about working of nested for loop can any one help me
Code for Easily Using Hash Table?
main(){int a=5,b 10,c=2, d;a=b c;d=++a=(--c)*2; printf("%d%d%d%d,a,b,c,d; return o;}