Question
Help me to find mistakes, this code isn't working. C Programming // Description: This program will work like a flash-card game // to help elementary
Help me to find mistakes, this code isn't working.
C Programming // Description: This program will work like a flash-card game // to help elementary students to practice their math skills. // Users may either pick their numbers and operation, or they // may allow the program to randomly generate one. The user // will enter an answer and be notified if their answer is // correct or not. // **********************************************************
//Preprocessor directives #include
//Function prototypes void display_intro(void); void display_border(void);
int main(void) { // declare variables int x = 0, y = 0; double answer = 0.0;
//Call a function to display intro & instructions display_intro();
//Get numbers to use in calculation printf ("Enter an integer: "); scanf("%d", &x);
// Ask user for math operation //printf("Enter math operation (+ - / * %): ");
// Get math operator from keyboard printf ("Enter another integer: "); scanf("%d", &y);
//Display several blank lines to separate user entry from report printf (" ------------------- ");
//Calculate and display results answer = x + y;
//Display answer in format of x + y = answer return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started