|
|
вернуться в форумWhat is wrong here? Послано Otaku 11 мар 2009 10:38 #include<iostream> using namespace std; int main() { int b,c=0; cin>>b; for(int i=0;i<=b;i++){ c+=i;} if(b<0){ for(int a=0;a>=b;a--){ c+=a; }c=c+1;} cout<<c; return 0; } I WROTE OWN EXAMPLES AND IT PASSED ALL OF THEM!!! Edited by author 11.03.2009 10:39 Re: What is wrong here? Послано melkiy 11 мар 2009 11:29 Try 0 as input, and speak not so loud, please ;) |
|
|