Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions