hi guys
please help me
This is program use c++ i need to sum numbers less than entry numbers i try to print even numbers less than entry but how to sum it ?
#include
using namespace std;
int main() {
/* Initialize i with 1. */
int i;
int n ;
cout << "Enter Number : ";
cin >> n; //take user input
/* If i is less than or equal to 100. */
while( i <= n){
/* If number is divisible by 2, then print.*/
if(i % 2 == 0){
cout <
}
/* Increment i. */
i++;
}
return 0;
}

Suraj KumarRank #353 · 7.1K reputationPosted Aug 5, 2018, 12:15 AM EDT
Suraj KumarRank #353 · 7.1K reputationPosted Aug 4, 2018, 11:26 PM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 4, 2018, 11:58 PM EDT
Suraj KumarRank #353 · 7.1K reputationPosted Aug 5, 2018, 12:11 AM EDT
Abdalla ElawadRank #1,443 · 1.1K reputationPosted Aug 5, 2018, 12:59 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts