“&&” and “and” operator in C

前端 未结 8 1869
名媛妹妹
名媛妹妹 2020-11-30 10:05

I am trying to calculate the Greatest Common Denominator of two integers.

C Code:

#include 

int gcd(int x, int y);

int main()
{
             


        
8条回答
  •  悲&欢浪女
    2020-11-30 10:26

    Check out the page here iso646.h

    This header defines 11 macro's that are the text equivalents of some common operators. and is one of the defines.

    Note that I can only test this for a C++ compiler so I'm not certain if you can use this with a strict C compiler.

    EDIT I've just tested it with a C compiler here and it does work.

提交回复
热议问题