|
#include <stdio.h>
typedef struct { char str[7]; int value; }element;
element test[5] = { {" 7 / 4", 7 / 4}, {"-7 / 4", -7 / 4}, {" 7 / -4", 7 / -4}, {"-7 % 4", -7 % 4}, {" 7 % -4", 7 % -4} };
int main(void) { int i;
for (i=0; i<5; i++) { printf("%s: %4d\n", test[i].str, test[i].value); }
return 0; }
|