Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;
Answer Posted / sandy
#include<iostream>
int i;
class A
{
public:
A(){cout<<i++<<endl;}
~A(){cout<<--i<<endl;}
}
int main()
{
A a[100];
return 0;
}
Is This Answer Correct ? | 41 Yes | 10 No |
Post New Answer View All Answers
How do I use strcmp?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What are qualifiers and modifiers c?
What is c system32 taskhostw exe?
How can I delete a file?
What is volatile variable in c?
Is c still relevant?
What is far pointer in c?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is FIFO?
What is your stream meaning?
What is static memory allocation? Explain
c program for searching a student details among 10 student details
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Explain what are preprocessor directives?