Submission #213804


Source Code Expand

#include<stdio.h>
#include<iostream>
using namespace std;

int abs(int a,int b){
	int c = a-b;
	if(c<0)
		return c*(-1);
	else
		return c;
}


int main()
{
	int a;	cin>>a;
	int b;	cin>>b;

	if(abs(a-b)>=6){
		if(a>b)
			b+=10;
		else
			a+=10;
	}

	cout<<abs(a-b)<<endl;


	return 0;
}

Submission Info

Submission Time
Task A - A
User sr_820
Language C++ (G++ 4.6.4)
Score 0
Code Size 318 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:20:12: error: too few arguments to function ‘int abs(int, int)’
./Main.cpp:6:5: note: declared here
./Main.cpp:27:15: error: too few arguments to function ‘int abs(int, int)’
./Main.cpp:6:5: note: declared here