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;
}
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;
}
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); }
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us