write a C++ programming :if the no is between 32 to 50 it
will be odd.

Answer Posted / devi

#include<iostream.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=32;i<=50;i++)
{
if(i%2==1)
{
cout<<"Odd Number is:"<<i<<endl;
}
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1510


How can we access protected and private members of a class?

587


What is a down cast?

606


Is c++ harder than java?

564


Is there finally in c++?

615






What is the standard template library (stl)?

617


Can we use this pointer in a class specific, operator-overloading function for new operator?

609


What is std namespace in c++?

715


What are the data types in c++?

513


What is searching? Explain linear and binary search.

582


Briefly describe a B+ tree. What is bulk loading in it?

793


When should overload new operator on a global basis or a class basis?

608


Can you pass an array to a function in c++?

537


Explain pass by value and pass by reference.

591


what are the iterator and generic algorithms.

1477