64 638
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #10341 in C++ for Benjamin

Question #10341
c program that generate all even numbers between 1 and 100 and sum two fractions
Expert's answer
#include "stdafx.h"
#include <iostream>

using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int sum=0;
cout<<"Even numbers:";
for(int i=1;i<=100;i++){
if(i%2==0){
cout<<i<<" ";
}

sum+=i;
}

cout<<"
Sum of two fractions is "<<sum/2;
int k;
cin>>k;
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions