answersLogoWhite

0


Best Answer

Well, you'd start by actually coding the calculator part, but at the end, you would test the answer with something like:

if(ans % 2 == 0) {
printf("%d is even.", ans);
} else {
printf("%d is odd.", ans);
}

The percent sign in the if test is the modulo operator. It returns the remainder of dividing the former argument by the latter argument.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a calculator using c that tells you if the answer to your problem is even or odd?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you answer multiplcation problems?

Either by using a calculator or working out the problem on paper.


How do you implement calculator in lex and yacc?

Create lex.l create yacc.y Compile using following: cc lex.yy.c yy.tab.c -ll -lm


What you the answer for this problem 1.583 plus 4.4 equal?

It is si very simple to get the answer using your calculator: it is 5.983


What is the benefit of using an FHA loan calculator?

There are many benefits to using an FHA loan calculator. An FHA loan calculator can tell someone how much of a loan they should apply for and would be able to pay back. It also tells a person how much a monthly payment would be on any amount of a loan.


What are advantages using calculator in teaching mathematics lesson?

Depending on the complexity of the calculation, a calculator can provide accurate answers more quickly.


How do you check mutiplication?

you could use a calculator or ask a teacher or ask a parent or use an online calculator or do the problem using another method thnx!! hope i helped peace out


Solving a mathematical problem without the use of paper and pencil calculator or computer is called using math.?

mental math


Why did William Seward Burroughs invent the calculator?

William Steward Burroughs invented the calculator because he wanted the world to know hot to solve equations and problems and figure out how to correctly do a math problem. he also wanted you to always get an answer right when using a calculator


What is triangle plus 5 equals?

I got 97. Try using a calculator for this problem, since doing it by hand is a real pain.


How do you find standard deviation using a calculator?

The answer depends on what functions are built into your calculator. Read the calculator manual.


What is the answer for the problem 6 divided by 186?

0.0323


Could you get in trouble for using a calculator for homework at a Christian school?

I don't think Christians have anything against calculators as such! The important thing is to know what your teacher is asking you to practise in the assignment. If it's the numerical methods themselves, you are cheating yourself and wasting your time if you are using a calculator instead. However if the point of the homework is showing you can set up the problem correctly there is nothing wrong with using a calculator to work out the final answer. However, always show your work.