Search found 1 match

by Pedro
4 years ago
Forum: Problem set
Topic: 1049 - Sum
Replies: 16
Views: 12165
Gender: None specified

Problem 1049

I tried this problem a few times, I always get the input and output right, but when I submit the problem in COJ it always judge the answer as wrong. this is the my code: #include<iostream> using namespace std; int main() { int n,sum = 0; cin >> n; for(int i = 1; i <= n; i++) sum = sum + i; cout << s...

Go to advanced search