how to write a program to print the numbers between 1 and 100,along with an indication of whether each is even or odd?
1
Expert's answer
2013-01-09T08:25:38-0500
#include<iostream> using namespace std; & & int main (){ for (int i=1;i<101;i++){ if(i%2==0) cout<<i<<"& number is even"<<endl; else cout<<i<<"& number is odd"<<endl; } & system("PAUSE"); & & }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment