Блог пользователя H.Handle

Автор H.Handle, 10 лет назад, По-английски

This is the question x-y but it is not complicated enough answer must not be negative. And it is the solution:

#include <stdio.h>
#include <algorithm>//Pro Code (C Oriented Develop Executable)
int Integer_Variable_1;
int Integer_Variable_2;
int Integer_Catalyzator_1;
int main()
{
		scanf	(
					"%d",&Integer_Variable_1
				);
		scanf	(
					"%d",&Integer_Variable_2
				);
		printf	(
					"\n"
				);
		Integer_Catalyzator_1=abs(Integer_Variable_1-Integer_Variable_2);
		printf	(
					"%d",Integer_Catalyzator_1
				);
		printf	(
					"\n"
				);
		return 0;		
		//End of Pro Code (C Oriented Develop Executable)
}

And here abs function yes it is absolute function for GCC:

if(Integer_Variable_1-Integer_Variable_2>0)//again it is Pro Code(C Oriented Develop Executable)
	return Integer_Variable_1-Integer_Variable_2;
else return abs(Integer_Variable_2-Integer_Variable_1);//The End

Thank you. If you want to support us please write some comment...:) please +.

  • Проголосовать: нравится
  • -40
  • Проголосовать: не нравится