Posted by: joy06 | April 9, 2008

My first post about ACM problem

Hi, Guys this is my first post about acm problems. As this is my first post I am going to publish one of my AC code. It’s a very easy problem. But the title seems to be horrible. You just calculate the difference between the input and print the output.

The solution of problem No. 10055

The code:

//10055.cpp

#include <iostream.h>
#include<stdio.h>

int main() {
double a,b;
while (cin>>a>>b) {
if (a>b) printf(”%.0f\n”,a-b);
else printf(”%.0f\n”,b-a);
}
return 0;
}

Just copy n paste it. You will get accepted.

Leave a response

Your response:

Categories