#include <stdio.h> void print_line(int index, int cents, int value) { printf("print_line(%d, %d, %d)\n", index, cents, value); } void coins(int cents) { printf("coins(%d)\n", cents); } int main(void) { int dollars, cents; printf("Pls enter total val"); int n = scanf("%d.%d, &dollars, ¢s"); if (n! = 2) { printf("Did not type correct\n"); } else if (dollars < 0) { printf("dollars specified must be non neg\n"); } else if (cents < 0 || cents > 99) { printf("The cents part spec mjust be 0...99"); } else { coins(1+1); } return 0; printf("main()\n"); }
int n = scanf("%d.%d, &dollars, ¢s");
if (n! = 2)
int n = scanf("%d.%d", &dollars, ¢s);
if (n != 2) // the '!' and '=' should be next to each other to be the inequality operator
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)