Question: its C programming language problem Problem 1 a) First program in C We are going to create a calculator that performs the basic operations. You

its C programming language problem

Problem 1

a) First program in C

We are going to create a calculator that performs the basic operations. You need three inputs: two floating numbers and the operator. The available operators are: + addition - subtraction * multiplication / division

b) Type of variables and updating variables

in C language, we have different type of value. It is important to choose the correct type. Why? Because of their ranges, and the memory space. Some values are int, float, double, long, unsigned, etc. In this problem, get a non-negative integer number xfrom the users input. Then, replace the value of xby its square, and print the mod 4294967295 of the updated variable. In a line or multi line comment, explain what you chose the data type for x. Note: You can only create one variable. Constraints: 0 x2321

// this is code please complete my code

#include

int main() { // Declare variables /* Complete here */

// Scan inputs /* Complete here */

// Perform the operation // First, we have to use an if or switch statement to know which operation we want to perform switch (operation){ case '+': // Complete here

break; case '-': result = a - b; break; case '/': if (b == 0){// we can not divide by 0 printf("It is not possible to perform the operation "); return 0; // Here we stop the program inmediately } else { // Complete here } break; case '*': // Complete here break; } printf("The result is: %.3f ", result); return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!