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;
}