Answer Posted / radhakrishnan
main()
{
int i,n,k;
cout>>"Enter the number:";
cin<<n;
k=n%2;
if(k==0)
n=n-1;
for(i=n;i<=n;i=1-2)
cout>>1;
}
Is This Answer Correct ? | 3 Yes | 11 No |
Post New Answer View All Answers
What is the difference between while and do while loop?
What are the uses of static class data?
What are dynamic type checking?
What is the use of class in c++?
What is lambda in c++?
Differentiate between a constructor and a destructor in c++.
What is a .lib file in c++?
Explain this pointer?
Can you declare an array without a size in c++?
If a header file is included twice by mistake in the program, will it give any error?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
How would you find out if a linked-list is a cycle or not?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What are virtual functions in c++?
What is the c++ programming language used for?