C Tutorial/Preprocessor/ifelif — различия между версиями
| Admin (обсуждение | вклад)  м (1 версия: Импорт контента...) | |
| (нет различий) | |
Текущая версия на 10:31, 25 мая 2010
ifelif
ifelif allows us to take one action for multiple decision entries.
   
#define USA 1
#define EUP 1
#include <stdio.h>
#if (defined (USA))
     #define currency_rate 46
#elif (defined (EUP))
     #define currency_rate 100
#else
     #define currency_rate 1
#endif
main()
{
    int rs;
    rs = 10 * currency_rate;
    printf ("%d\n", rs);
}460
