Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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); } 
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #Print #number #loop
ADD COMMENT
Topic
Name
3+4 =