answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

int main(void)

{

float a,b,c=0, d=0, e=0,f=0;

printf("Please enter two numbers:\n");

scanf("%f %f", &a, &b);

c=a+b;

d=a-b;

e=a*b;

f=a/b;

printf("The sum of %f and %f is :%f\n", a,b,c);

printf("The subtraction of %f and %f is :%f\n", a,b,d);

printf("The multiplication of %f and %f is :%f\n", a,b,e);

printf("The division of %f by %f is :%f\n",a,b,f);

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a calculator in code block by using c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you make menu using jcreator in java?

Currency Source Code Using JCreator


What is meant by the phrase one block of code can be nested in another?

It simply means one code block contains another code block. How you achieve this depends on the language, but in many languages we use opening and closing braces to define a code block. function foo () { // start of function block { // start of nested block // ... } // end of nested block } // end of function block Nested code blocks are typically used to define a new scope within an existing scope. Any variables declared within the nested block are local to the scope of that block and will fall from scope when we exit the nested block. This can be useful when we want to instantiate new variables within a larger scope but want to localise them to the code block that actually uses them. In some languages (such as C++) this also allows us to redefine names that were initially defined by the enclosing scope, temporarily hiding the original names from within the nested scope (only the local names are visible). When we exit the nested block, the original names become visible again. However, referring to two separate variables by the same name within two scopes of the same function can make code difficult to read, so this is best avoided.


How to make a Show Hide HTML?

You cannot make an html for show hide, one can simply use javascript to create the show hide code that you are looking for. Depending on what you want, the code is fairly simple using a javascript html code resources.


How do you make a random number using Python?

this is the code for making a random number using python: import random &gt;&gt;&gt;random.randint (1, 10) you can do whatever numbers you want.


How do you make a block movable using javascript?

search google for 'drag and drop script' OR go and download script.aculo.us, and implement the great drag and drop scripts they have.

Related questions

How do you block outgoing calls to area code 828?

That may depend on your telephone company and/or on the specific make and model of mobile phone you are using.


How do you make a Nether portal with no diamonds in Minecraft?

You could make a mould using any block that can't catch fire, and create the portal block by block first by pouring lava from a bucket into the spot you want the next obsidian block to be, then using water to turn it into Obsidian.


Does using a calculator make you less intelligent?

No. However, alike anything else in life. If you use a calculator for everything, then the most remedial calculations may become hard to do without a calculator. It is good practise to do without a calculator where possible


How do you make seven eighths a decimal?

Divide 7 by 8, using a calculator or a pencil, to get 0.875 .


How do you multiply a 4 digit number by a 2 digit number?

Using a calculator will make it easier


What is a good brand of commercial loan calculator?

One good online source for a commercial loan calculator is found at Calculator Plus. It requires an updated plug-in to use but has many features that make it worth using.


You want to make 99 by using your calculator but the 9 key and the plus key and the minus key are broken how can you use your calculator to do this task?

33*3 11*9


Using an Income Tax Calculator to Make Filing Easier?

Even if you self file your taxes at the end of the year, you could still use the help of an online tool that can help you to more accurately figure out your total liability. The increasing complexity of the tax code as created an environment where income tax calculator services are becoming very much in demand, and it's easy to understand why. Since the tax code can be so perplexing, it's great to have a calculator that can take all of your independent variables into account to generate an accurate amount to put on your tax return. When you use an income tax calculator online, make sure the calculator is reputable so you know you're not putting false information on your tax return.


How do you code a layout on photofiltre?

you don't code the layouts in photofiltre , u make them then code them using HTML


What is the code for becoming rich in vice city?

there is no such code which can make you rich.You can do that by using trainer.


How do you make menu using jcreator in java?

Currency Source Code Using JCreator


Why finally block is used even though statements after catch block are executable with out enclosing them in finally block?

Code in the finally block is executed even if no exception is thrown. That is to say, it is a way to make sure that a second of code always executes regardless of the path taken to reach the end of the try-catch block. The code in the catch block is executed only if there is an exception caught; it is intended to handle the situation that threw the exception. As a trivial example, you might allocate memory, perform some transaction, save the data to a file, then close the file and deallocate memory. It would make sense to put the memory allocation, file allocation, and data processing inside the try block, so you can catch any exceptions, then handle the exceptions in the catch block, and finally deallocate the memory and close the file, if open, using a finally block (to ensure that all resources were released, regardless of the exception handling).