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 use of pointer in c++ with example?
What is protected inheritance?
How do you decide which integer type to use?
What is virtual table?
Discuss the possibilities related to the termination of a program before entering the mainq method?
Which c++ operator cannot overload?
What are the different types of polymorphism in c++?
What is diamond problem in c++?
Can I learn c++ in a week?
What is a breakpoint?
Write a program using display() function which takes two arguments.
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
Explain the difference between overloading and overriding?
Why namespace is used in c++?
What data encapsulation is in c++?