Answer Posted / nagarajan n.
int n;
cout<<"enter a num:";
cin>>n;
for(int i=n;i>=1;i--)
{
if((i%2)!=0)
{
cout<<i<<"/t";
}
}
| Is This Answer Correct ? | 50 Yes | 26 No |
Post New Answer View All Answers
What is array give example?
How does c++ sort work?
What is operators in c++?
Which one is a preferred language C or C++? Why?
Is overriding possible in c++?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
What are the types of array in c++?
Explain how functions are classified in C++ ?
What is the use of string in c++?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Give 10 points of differences between C & C++.
What is the use of register keyword with the variables?
What is the use of ::(scope resolution operator)?
Explain the register storage classes in c++.
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h