If then statement in Macro
I am trying to write a macro that returns true if its parameter is divisible by ten. False if otherwise.
This is for an "On your own learning" with a book and this problem is stumping me. it complains" expected primary expression before else"
I appreciate any help
Thank you
Code:
#include <stdio.h>#include <string.h>
#include <stdlib.h>
/* Macro funcions*/
#define modulus(x) {if(x%10 == 0){printf("true\n"); else printf("false\n");}}
/* Declare variables*/
float centi;
float fahr;
char line[100];
int main()
{
int count = 12;
modulus(count);
system("pause"); /* the fix for the collapsing window*/
return (0);
}