ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1068. Sum

help, please; i can't get AC, but i know that my program is wright
Posted by Foxy 23 Aug 2001 22:38
Re: help, please; i can't get AC, but i know that my program is wright
Posted by GoGo 24 Aug 2001 01:04
> here is my source (C++):
---------------------------
#include <stdio.h>

int i;long sum=0;
int n;

void main()
 {
  scanf("%d",&n);
  if(n<1)
   for(i=1;i>=n;i--)
    sum+=i;
  else
   for(i=1;i<=n;i++)
    sum+=i;
  printf("%ld",sum);
 }
--------------------------
Re: help, please; i can't get AC, but i know that my program is wright
Posted by Александр 10 Oct 2012 11:53
Try to delete  void  because  i did so , and my programm was right good Luck !