how do I fix when it hits the second session it skips scanf.
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
main() {
double first, second;
while(1){
printf(" Calculator\n");
printf("\n 7 8 9 / \n 4 5 6 x \n 1 2 3 - \nEnter operator: ");
char op;
scanf("%c" ,&op); //entering operators such as + - \ *
printf("Enter two operands:");
scanf("%lf %lf", &first, &second); //entering operands such as 1 2 5 8 12 414
switch (op) { // printing the math
case '+'://if its +
printf("%.1lf + %.1lf = %lf\n\n", first, second, first + second);
break;
case '-'://if its -
printf("%.1lf - %.1lf = %lf\n\n", first, second, first - second);
break;
case '*'://if its *
printf("%.1lf * %.1lf = %lf\n\n", first, second, first * second);
break;
case '/'://if its :
printf("%.1lf / %.1lf = %lf\n\n", first, second, first / second);
break;
default://if its not + - / *
printf("error!");
}
}
}

Answers

Answer 1

Answer:

scanf(" %c" ,&op); //entering operators such as + - \ *

Explanation:

put space before %c


Related Questions

Match up each definition and term. Please help asap

Answers

Answer:

Query - Definition - Search by specific information Example - Find T-shirt in a specific size

Flat File Database - Definition - Simple database where each row is a record Example - Excel file of names and addresses

Fields - Definition - Different types of data for each record (columns) Example - Type of clothing, colour, size, price

Sort - Definition - Show records in different order based on its fields Example - Arrange all records alphabetically by colour

Record - Definition - Main item in a list (row) Example - Jeans

Text Field - Definition - Any number, letter, and all symbols Example - Levi's 518

Date Field - Definition - Date in a specific format Example - 2020-06-30

TIME Field - Definition - Any format of a timestamp Example - 10:42 PM

Graphic Field - Definition - Any kind of image Example - Logo

Calculated Field - Definition - Contains a formula to work something out Example - Length of time item has been in inventory

Number Field - Definition - Contains numbers that may be used in future calculations Example - $237.42

Brainlist Pls!

The page that appears when you first open your Internet browser is the _____.


opening page
opening page

launch page
launch page

home page
home page

first page
first page

Answers

Answer:

i think it's opening page

Answer:

i think its also opening page

Explanation:

Which of the following is an example of a moving method?

Answers

Which of the following is an example of an urgent move?

rapid extrication technique

Which one of these actions isn't a valid way to update the status of a lead? A. Click "Mark Status as Complete" in Path. B. Click the desired step on the Path, then click "Mark Current Status." C. View the lead record, click "Edit," and change the Status field. D. Change the Kanban settings Group By to "status." Drag the record to a different column. E. In any list view, click "Shuffle" to change up every record's status.

Answers

The action that is not  a valid way to update the status of a lead is that In any list, click "Shuffle" to change up every record's status.

How do I update lead status?

To update any  lead from a list view such as one that is found in Salesforce One has to select the leads that the person want to edit and then by double-clicking the specified field value and then make the change that you want.

Note that the update  differs for others and the action that is not a valid way to update the status of a lead is that In any list, click "Shuffle" to change up every record's status. This is wrong.

Learn more about update from

https://brainly.com/question/10106963

A pointing device used mainly for computer games is known as
A.stylus
B.Digitizer
C.joystick

Answers

Answer: Joystick is the only one that makes sense, a stylus and digitizer are both used on drawing tablets, not computer games.

What can a company learn by studying website analytics for its website?.

Answers

Answer:

they can learn how people interact with it

Explanation:

Social media tools allow you to connect with people anywhere in the world who share your interests evaluate your interactions with people living outside the United States using various Social media tools how his influences how do you break cultural stereotypes and discover the local activities career aspirations in sports preferences of people from other cultures what is a social media tools that you used to form these connections explain how these connections have been influenced you, providing specific examples

Answers

The social media tools that you used to form these connections are:

Buzz Sumo. Go ogle Trends. Buffer Publish.Can va. Un splash

What are social media tools?

Social media tools are known to be key tools that are used for the running of business so as to handle important ways in their Digital Marketing routine.

The social media tools are important because it helps one to plan ahead and also  ensure that a person post the type of content needed to reach your goals and grow one's business.

Learn more about  social media from

https://brainly.com/question/3653791

The first time you save a file, there is no difference between the Blank Space __________ and Save As commands.

Answers

I think the answer is save.

Hope that helps!

Give 3 reasons why it is believed that smart phones precent us from communicating face to face.give three reasons why it is believed that smartphones prevent us from communicating face to face ​

Answers

Answer:

yes

Explanation:

because the people will be lazy to go and talk to that person instead They will call each other and discuss

W
tickets for tsg airlines are coded as follows:
• united kingdom flights are coded a, european flights b, asian
flights c, and american flights d.
overnight flights between 10pm and 6am use the same codes,
but with lower case letters (a, b, c, d)
• male passengers are coded x and female passengers are coded
y
• children under 16 are coded lowercase (x, y)
• meals are coded vegetarian v, beef b, and chicken k
• first class passengers are a, business class are b, and economy
is c
what is the code for a flight from chicago to new york at 5am for a
vegetarian 8 year old girl traveling in economy class?

Answers

The flight code of the tsg airlines is an illustration of computer coding

The code of the flight is AayvC

How to determine the code of the flight?

From the question, we have the following parameters:

UK = A, Europe = B, Asian = C, and the Americas = D.Flight between 10 pm and 6 am = (a,b,c, and d)Male passengers = X;  Female passengers = Y.Children under 16 = (x.y)Vegetarian Meal  = v; Beef = b, Children = KFirst Class = A, Business Class = P; Economy = C

To code the flight of the girl, we have the following parameters:

Destination =UK; UK code is ATime = 5AM; UK flight before 6AM is coded aFemale children under 16 is coded yMeal = vegetarian; The code for this is vEconomy class is coded C

Hence, the code of the flight is AayvC

Read more about coding at:

https://brainly.com/question/24735155

30 POINTS!!!! HELPPPPP!!! in computer science, what does the term inference mean?
a. the wiring connection between the computer and all of its hardware devices
b. an internal switch inside the monitor that dims the screen's brightness at sunset
c. a device or program that allows a user to communicate with a computer
d. a sensor that turns the computer fan on when the computer gets too hot

Answers

Answer:

A. The act or process of reaching a conclusion about something from known facts

Hope this helps you!

Please Mark me Brainlest!!

Answer: c. a device or program that allows a user to communicate with a computer

Explanation:

Fill in the blanks to explain another memory Grandpa shares with
Amara

Answers

The answers to the fill in of blanks to explain another memory Grandpa shares with Amara are

Young RecentlyOnly moments ago

What is  blank statement?

A blank statement is known to be a kind of empty statement where some information are said to be missing.

In the text above, . "Even though her Grandfather had passed away when Gina was little young" and Recently, her memories of him are still as fresh as the bakers bread."

Learn more about blanks  from

https://brainly.com/question/25573309

What is the name for the base-2 system used by computers to represent
data?
O A. Unicode
O B. Binary code
C. Hexadecimal code
D. Decimal code

Answers

Answer:

B. Binary Code

Explanation:

Binary code is the base-2 system used by computers to represent data. Binary code consists of 0's and 1's which can be used to represent states such as on or off; go or no-go and more.

_______ are malicious programs that come into a computer system disguised as something else such as a free computer game or screen saver.

Answers

Answer:

Trojan horses

Explanation:

A citizen of any group has both _____ and _____.

Answers

Answer:

rights and responsibilities

Explanation:

Answer: Down below

Explanation:

A company has employees who write down passwords, which should be kept private, on sticky notes. Given this scenario, what should the IT security department implement to prevent this type of mishandling of confidential information

Answers

Save the passwords to an encrypted database, saving the passwords as hash values to keep confidentiality.

Blake is on the fast track and hopes to get a promotion soon. he wants to make sure that he is always able to
work at peak proficiency on the job. he has done a great deal of work and has numerous essential files that are
crucial to his job. he uses this utility to make sure these files are saved on the office's external hard drive.

a.remote control
b.firewall
c.file compression
d.backup

Answers

Answer:

D

Explanation:

A new cybersecurity analyst is working at their first job. the analyst requires a penetration test reporting and evidence gathering framework that can run automated tests through integration with metasploit. recommend a framework that will fulfill the analyst's needs.

Answers

The Recommendations of a framework that will help to fulfill the analyst's needs is that he or she should not use Sn1per.

What is Sn1per?

The term Sn1per is known to be a form of automated scanner that is able to be employed in a penetration test.

It is often used to list out and scan for any form of  vulnerabilities. The use of Sn1per will  fulfill the analyst's needs in terms of that framework.

Learn more about test reporting from

https://brainly.com/question/6076728

How to ignore punctuation before and after a word javascript

Answers

Answer:

If you want to remove/ ignore punctuation before and after a word javascript, my suggestion is to remove specific punctuation from a string, it will probably be best to explicitly remove exactly what you won't like.

How do you answer this ?

Answers

Answer:

Just put True or false for your answer

Explanation:

Use a Dictionary

write the algorithms for the problem How to post a letter ? you can put pictures for the steps ​

Answers

❖ Step 1: Start

❖ Step 2: Write a letter

❖ Step 3: Put in envelope

❖ Step 4: Paste stamp

❖ Step 5: Put it in the letter box

❖ Step 6: Stop

[tex]\frak{\fcolorbox{black}{pink}{Black Pink in your area$~$}}[/tex] ~←(>▽<)ノ

Lattice-based access controls use a two-dimensional matrix to assign authorizations. What are the two dimensions and what are they called

Answers

Answer:

riesige Pyramide

Explanation:

riesige Pyramide

A Lattice-based access controls is used to value derivatives by employing a binomial tree to calculate the various ways the price of an underlying asset, such as a stock, might take over the derivative's life.

What are Lattice-based access controls?

In computer security, lattice-based access control exists as a complex access control model established on the relations between any assortment of objects and subjects.

A Lattice-based access controls is used to value derivatives by employing a binomial tree to calculate the various ways the price of an underlying asset, such as a stock, might take over the derivative's life. The binomial tree plots out the potential values graphically that alternative prices can have over additional time periods.

Three primary kinds of access control systems exist Discretionary Access Control (DAC), Role Based Access Control (RBAC), and Mandatory Access Control (MAC).

There are two kinds of access control: physical and logical. Physical access control limitations access to campuses, buildings, rooms, and physical IT assets. Logical access control limitations connections to computer networks, system files, and data.

To learn more about Lattice-based access controls refer to:

https://brainly.com/question/14982444

#SPJ2

Choose the response that best completes the following statement. (5 points) Simulation is the creation of a model that can be manipulated ________ to decide how the physical world works. creatively logically strategically virtually

Answers

Simulation is the creation of a model that can be manipulated  logically to decide how the physical world works.

What is the simulation of a model?

Simulation modeling is known to be the act of making  and analyzing a kind of digital prototype of a physical model to know  its performance.

Note that this modeling is often used to help designers and engineers to know if and what conditions ways or  a part may  fail and what loads it can hold.

Learn more about Simulation from

https://brainly.com/question/24912812

A(n) ________ area network is a type of wireless network that works within your immediate surroundings to connect cell phones to headsets, controllers to game systems, and so on. A(n) ________ area network is a type of wireless network that works within your immediate surroundings to connect cell phones to headsets, controllers to game systems, and so on. wide personal local gateway

Answers

A personal area network is a type of wireless network that works within your immediate surroundings.

What is a personal area network?

A personal area network (PAN) is known to be a kind of computer network that has been made to function as an interconnecting electronic devices that is also found within an person's own workspace.

Note that a PAN is one that gives or helps in data transmission among devices such as computers, smartphones, etc.

Learn more about personal area network from

https://brainly.com/question/1167985

Spammers can defeat the registration process of free email services by launching a coordinated attack that can sign up for thousands of untraceable email accounts. what is this type of attack known as:_____.

Answers

Answer:

DDOS OR DOS

Explanation:

im sure its either DOS or DDOS(distributed denial of service)

Look at the color key below the map that shows the overall performance range. What is the range for 1 Year Performance? How does it compare to the 1 Day Performance range?

Answers

A performance range simply means the threshold and maximum percentage of shares that may become earned.

What is a performance range?

Your information is incomplete. Therefore, an overview will be given. A performance range is the maximum percentage if shares that may become earned shares due to the attainment of the requirements of the performance.

It should be noted that in this case, the opportunity to incentivize performance will be associated with the relative performance.

Learn more about performance on:

https://brainly.com/question/26256535

Pauline has a well-established app with a large user base. Now she needs new users who complete valuable actions within the app. What phase does this fall under?

Answers

Answer:

Maturity because if you want new users who will complete [valuable]  actions they need to be [Mature].

Explanation:

What element allows text to be displayed in italics, which means the words are slanted to the right?

a
The < crooked > element

b
The < italic > element

c
The < em > element

d
The < slant > element

Answers

Answer:

the answer is the italic element

What is a critical consideration on using cloud-based file sharing and storage applications.

Answers

Answer:

a critical consideration on using cloud-based file sharing and storage applications on your Government-furnished equipment (GFE)? Determine if the software or service is authorized. A coworker wants to send you a sensitive document to review while you are at lunch and you only have your personal tablet.

Pls mark me as brainlist

This is a critical consideration on using cloud-based file sharing and storage applications to determine that Determine the software program or provider is authorized.

What are the Indicators ?

It is of a capability insider chance may be damaged into 4 categories--signs of: recruitment, facts collection, facts transmittal and preferred suspicious behavior.

Determine if the software program or provider is authorized. A coworker desires to ship you a touchy record to study even as you're at lunch and also you most effectively have your private tablet.

Read more about the cloud-based file:

https://brainly.com/question/24228581

#SPJ2

Consider the following recursive method. public static string recur(int val) { string dig = "" + (val % 3); if (val / 3 > 0) return dig + recur(val / 3); return dig; } what is printed as a result of executing the following statement? system.out.println(recur(32));

Answers

The recursive method recur executes itself from within

When the statement System.out.println(recur(32)); is executed, the string value "2101" is printed

How to determine the output of the statement?

The flow of the program is as follows:

The method keeps updating the string variable dig with the remainder of the val variable divided by 3When the remainder is less than or equal to 0, the method is exited

So, when 32 is divided by 3.

The remainders are 2, 1, 0 and 1

So, the output of the statement is "2101"

Read about java methods at:

https://brainly.com/question/19271625

Other Questions
helpppp Solve for x. TESTI: Directions: Read the statements carefully. Wnte Agree or Disagree on the following situations White your answers on the line provided before each number 1 in creating an interesting design harmony and contrast are necessary 2. Color is one of the most dominant element 3 Contrast refers to the arrangement of elements. 4. A design without harmony is an appealing art 5. A repetitive pattem is an art 6. Sculpture is a 3D visual art created by simply shaping materials into objects without applying the elements and principles of arts 7. Concepts of lines and shapes are applied in sculpting 8 The elements and principles of art are shown on the objects around us 9. Bronze soap and sand are some of the matenals used in sculpting 10 With the advancement of technology sculpting can only be done manually Please Help!!Cherry Hill Orchards produced 500 tons of cherries during their first year of business, 2012. Since then, the cherry harvest continues to increase in production by 5. 7% over the previous year. Write an exponential function, f(x), that models the tons of cherries produced by Cherry Hill Orchards x years after 2012. Enter your answer by filling in the boxes. f(x)= -------- * ( )^x A survey of high school juniors found the 75% of the students plan on attending college. If you pick 3 students at random, what is the probability that at least two plan on attending college? Round to the nearest percentage. A right square pyramid is shown. The height is 10 centimeters and the side length of the base is 16 centimeters. What is the length, in centimeters (cm), of s? Write 3 questions and 3 answers using stem-changing verbs. Use a different verb for each question. Be careful with the subject and verb agreement! give an equation for the graph what falls out of dr clarks suitcase Do u think heaven is real? The key differences between rotational kinematics and translational kinematics is: A. Rotational kinematics must specify an axis of rotation and objects return to their initial position with successive revolutions. B. Rotational kinematics must specify an axis of rotation and is only applied to rigid objects, not particles. C. Rotational kinematics analyzes both the tangential acceleration as well as the centripetal acceleration and translational kinematics analyzes only the tangential acceleration. D. Rotational kinematics must specify an axis of rotation and uses only dimensionless units 1. Find the total area. Round to the nearest hundredth. What prior species of hominids did homo sapiens encounter in europe approximately 40,000 years ago?. Why did many conservatives oppose affirmative action?. As a first responder, you don't have much control over the lamp color or the type of light on your response vehicles those decisions are made by the state and by _________ administrators. Write an equation of the line that passes through (0, 0) and (2, 6). Jen buys 4 tires for $272. Each tire was the same price.What is the cost of 1 tire Water is flowing steadily through a venturi that is oriented vertically. The venturi is attached to a mercury manometer that reads a 14. 3-inch deflection. 14. 3" z 30" 12" 6" a. ) 5 Points. In which direction is the water flowing? Justify your answer Complete the sentence with the correct pronoun.Mary told her friend, Janice, "________________________ can come to our house.""Thanks for the invitation," said Janice.A.) YouB.) IC.) WeD.) she please help me- i have a test on Friday-. T^T Look at the color key below the map that shows the overall performance range. What is the range for 1 Year Performance? How does it compare to the 1 Day Performance range?