Answers for "print even numbers in c++"

C++
0

c++ program to print odd numbers using loop

/*Q:Use Loops to print odd ids of employees from 1 to
19.*/
#include<iostream>
using namespace std;
int main()
{
int a;
for(a=1;a<=19;a+=2)
{
cout<<"Employee Id's= "<<a<<endl;
}
Posted by: Guest on March-17-2022
0

Print all even number using for loop c++

#include<stdio.h> #include <iostream> using namespace std; int main(){     int number;     int min=10,max=50;      cout << "Enter the minimum range: ";     cin >> min;      cout << "Enter the maximum range: ";     cin >> max;     cout << "even numbers in given range are: ";     for(number = min;number <= max; number++)          if(number % 2 ==0)           cout << number << " ";  	return (0); } 
Posted by: Guest on October-10-2021

Code answers related to "print even numbers in c++"

Browse Popular Code Answers by Language