IT Help Desk > Programming Competition

Programming Contest Training Site

(1/1)

Nazmul:
Dear Studenets,
Please Register here for online training for programming contest: http://ace.delos.com/usacogate

Here is the solution for first problem from USACO site:

/*
ID: nazmul1
LANG: C
TASK: test
*/
# include <stdio.h>

int main()
{
   int a,b;
   freopen("test.in","r",stdin);
   freopen("test.out","w",stdout);

   scanf("%d%d",&a,&b);
   printf("%d\n",a+b);
   return 0;
}

NB: USACO training site requires input from file & output ot file. Observe the sample solution for the way of taking input from file & gives output from file. use freopen() function.

s.islam:
Thanks for your informative and meaningful post.

Navigation

[0] Message Index

Go to full version