0

Write a program that finds the sum of integer number in the interval [1,25]

19th Nov 2016, 9:14 AM
Israa Elwan
Israa Elwan - avatar
2 Respostas
+ 1
for (int i=1; i<26; i++) { i+=i; }
19th Nov 2016, 11:15 AM
Oluwatosin Akinbobuyi
Oluwatosin Akinbobuyi - avatar
0
#include <iostream> using namespace std; int main() { int i,sum=0; for (int i=1; i<26; i++) { sum+=i; } cout<<sum; return 0; }
19th Nov 2016, 11:29 AM
Israa Elwan
Israa Elwan - avatar