Prasenjit Kumar Nag a.k.a Joy

A Developers Adventure in Coding

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
//10055.cpp

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

int main() {
double a,b;
while (cin<<a<<b) {
if (a>b) printf("%.0fn",a-b);
else printf("%.0fn",b-a);
}
return 0;
}

Just copy n paste it. You will get accepted.

Comments