0
Write program given below..
Write a program that asks the user to enter two positive integers. The program then prints a list of even and a list of odd numbers between the given integers.
3 Respostas
0
Pls share your attempt here
0
#include <iostream>
using namespace std;
int main ()
{
int num;
int min,max;
cout<< "Enter a min number";
cin>> min;
cout<< "Enter a max number";
cin>> max;
cou<< "odd num in given range are";
for(number=min;number<=max;num++)
if( num %2!=0)
cout<<num<<"";
cout<< "even num in given range are";
for (number=min;number<=max;num++)
if (num %2==0)
cout<<num<<"";
return 0;
}
0
Why you write number in loop it is num