Author Topic: Programming Contest Training Site  (Read 2758 times)

Offline Nazmul

  • Faculty
  • Newbie
  • *
  • Posts: 35
  • Senior Lecturer (On Study Leave), Dept. of CSE
    • View Profile
    • Nazmul Haque's WebHome
Programming Contest Training Site
« on: July 13, 2009, 04:43:40 PM »
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.
« Last Edit: July 13, 2009, 04:47:28 PM by Nazmul »
Mohammad Nazmul Haque
Senior Lecturer
(On Study Leave)
Dept. of CSE,CIS & CS
Daffodil International University
102 Sukrabad,Mirpur Road,
Dhaka-1207,Bangladesh

email: nazmul@daffodilvarsity.edu.bd
web: http://daffodilvarsity.edu.bd/faculty/nazmul/

Offline s.islam

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Programming Contest Training Site
« Reply #1 on: December 04, 2011, 04:46:12 PM »
Thanks for your informative and meaningful post.