Question about Computers & Internet

1 Answer

Turbo c source code

Source code for calculator

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 148 Answers

#include<stdio.h>

float add(float,float);
float sub(float,float);
float product(float,float);
float divide(float,float);

void main()
{
float n1,n2;
char sym,choice;
printf("This Program is a program for calculator\n\n");
scanf("%f%c%f",&n1,&sym,&n2);
if(sym=='+')
printf("\n%f",add(n1,n2));
if(sym=='-')
printf("\n%f",sub(n1,n2));
if(sym=='*')
printf("\n%f",product(n1,n2));
if(sym=='/')
printf("%f",divide(n1,n2));
printf("\nDo you wish to continue[y/n]");
scanf("%s",&choice);
if(choice=='y'||choice=='Y')
main();
}

float add(float m1,float m2)
{
return(m1+m2);
}

float sub(float m1,float m2)
{
return(m1-m2);
}

float product(float m1,float m2)
{
return(m1*m2);
}

float divide(float m1,float m2)
{
return(m1/m2);
}

Posted on Feb 21, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

When i install turbo c in windows 7 OS the problem is the source path name that i don't understand what is it . so plz describe the source path name is what .


Hi, the source path refers to the location of the file or files that you want to copy. So if you are copying a file from C:\Windows to C:\Microsoft, the source path would be C:\Windows and the destination path would be C:\Microsoft.

If you're installing the program from a CD or DVD, the source path would be the CD/DVD drive, which is generally D: or E:. If you're installing from a floppy disk, the source path is probably A:.

Nov 19, 2010 | Computers & Internet

1 Answer

I want to get the source code for making simple calculator in VC++ dialogue based application for free.please if u can mail me at zahidashaikh7@gmail.com


Try looking up for this easy application from this site. It has a lot of free codes for download and also available in different languages. www.planetsourcecode.com

Sep 29, 2010 | Microsoft Computers & Internet

1 Answer

HOW TO INSTALL TURBO C


Hi,

Download the turbo c from the link below:

http://www.brothersoft.com/turbo-c-download-182798.html

Once the download is done. You need to extract the files and follow the steps below to install it.

1. Open the folder where you have the files extracted and open INSTALL.EXE
2. Press Enter to continue.
3. It'll ask you on which drive you want to install it. type in c (hopping c is loacl HDD) and press enter.
4.Press enter on enter the source path.
5. On the next screen press F9 key to start the installation or select the option start installation and press enter.
6. Once the installation is done your TC is installed in c:\TC.
7. Open C:\tc\BIN and tc.exe.

Hope this should help you!

Rashish

Aug 19, 2010 | Computers & Internet

2 Answers

HOW TO RUN TURBO C IN 64 BIT WINDOWS 7


Hi,

Turbo C/C++

64 Bit operating systems like Windows Xp64, Windows Vista64, and Window 7 will no longer run 16 bit applications and this includes Turbo C 2.01/Turbo C++ 3.0/3.1 or the programs they produce.
Turbo C 2.0 was first released in 1989, Turbo C++ 3.1 in 1991 making these programs nearly two decades old. They are just too old to run on modern PCs.

Upgrade To Modern Compiler

Note that Turbo C/C++ is very very very very old and produces 16 bit programs which no long run on many modern computers. So the best advice is to upgrade to a new compiler. There are many free compilers out there that you can use.

Free Compilers:
  • Microsoft Express 2008 -- Great compiler and comes with a nice IDE (Visual Studio)
  • MinGW -- Command line compiler but there are many IDEs that use it such as Code::Blocks, Eclipse, Dev-C++
  • Borland C++ 5.5 -- Will compile Turbo C++ programs (including graphics.h) but produces 32bit code (slightly better than Turbo C) Only includes command line tools.
  • DigitalMars -- Its still old but at least it produces 32bit programs (better than Turbo C). You might stumble across D++ which is a very powerful language derivative of C++.
  • OpenWacom -- Again, nearly as old as Turbo C, but it produces more modern 32bit applications! (this project is still active too).
If you are just working with C there is:
  • Pelles -- and excellent modern C compiler and IDE. Pelles also has the new TR1 libraries available so you can use regex and other new features. As well as support for many older libraries.
  • LCC-Win32 -- Used as the basis for many of the research compilers.
  • Tiny C -- is said to produce very fast programs.
.
All of the above are Free and all excellent replacements for Turbo C which is so old it will not even run on your computer.


Regards.

May 24, 2010 | Microsoft Windows Vista Ultimate Edition

6 Answers

How to run turbo c++in vista 64 bit os


You can run Turbo C++ 3.0 on Windows XP 64 bit , Vista 32 bit and 64 bit OS (in full screen)

Install the software DOSBox ver 0.72 (Freeware) from the link below (Direct Link)

http://prdownloads.so urcef orge.net/dosbox/DOSBox0.72-win 32-in staller.exe?download

Before going to the details u have to create a folder (any name will do).

Here we name it as Turbo

Copy the TC into the Turbo folder

Run the DOSBox 0.72 from the icon located on the desktop or from the location of the installation folder

Then u are presented with two screens which look like the command prompt in Windows

Now u are presented with two screens. One with a Z prompt. U can ignore the other screen.

There type the following commands at the command prompt [Z]:

Mount [Type in any alphabet that u wish except z] [Type the source of the turbo C] press enter

For example (Type in the following commands after the Z prompt):

Z: mount d c:\Turbo\ [The folder TC is present inside the folder Turbo]

* Now u should get a message which says: Drive D is mounted as a local directory c:\Turbo\ ***

C:\> cd TC [The contents inside the folder Turbo gets mounted as a virtual drive (Here D drive)

source site :

http://mycomputer.freefor ums.o rg/running-turbo-c-in-full-scr een-m ode-help-t1241.html .

Sep 03, 2009 | Microsoft Windows Vista Ultimate Edition

1 Answer

Problem for installing turboc++4.5 in wista


ok man i too had teh same prob dont back to xp

Before going to the details u have to create a folder (any name will do). Here we name it as Turbo

Copy the TC into the Turbo folder

Run the DOSBox 0.72 from the icon located on the desktop or from the location of the installation folder

Then u are presented with two screens which look like the command prompt in Windows

Now u are presented with two screens. One with a Z prompt. U can ignore the other screen.

There type the following commands at the command prompt [Z]:

Mount [Type in any alphabet that u wish except z] [Type the source of the turbo C] press enter

Now , Type in the following commands after the Z prompt:

Z: mount d c:\Turbo\ [The folder TC is present inside the folder Turbo]

* Now u should get a message which says: Drive D is mounted as a local directory c:\Turbo\ ***

Now type d: to shift to d: prompt .

D: cd TC [The contents inside the folder Turbo gets mounted as a virtual drive (Here D drive)

D: cd Bin

D: TC or Tc.exe [This presents u the Turbo C++3.0 screen]

On the Turbo C++ goto Options>Directories>Change the source of TC to the source directory [D] ( i.e. virtual D: refers to original c:\Turbo\ . So make the path change to something like D:\TC\include and D:\TC\lib respectively )

===========================================================

In order to get the full screen use the key combination of Alt and Enter

When u exit from the DosBox [precisely when u unmount the virtual drive where Turbo C++ 3.0 has been mounted] all the files u have saved or made changes in Turbo C++ 3.0 will be copied into the source directory(The directory which contains TC folder)

It is a good idea to backup your files in the source directory prior to running DOSBox 0.72

For additional help go through the readme file located in the installation folder or look on the website of the DOSBox forum.

The above procedure has been successfully implemented on Windows Vista Ultimate 64 bit

IMP : Don't use shortcut keys to perform operations in TC because they might be a shortuct key for DOSBOX also . Eg : Ctrl+F9 will exit DOSBOX rather running the code .

Jun 17, 2009 | Microsoft Windows Vista Ultimate Edition

1 Answer

I need to program a calculator in vb 6


Dear here is the link that contains a sample code to your problem.

http://www.vb6.us/source-code/simple-calculator-written-vb6

Best regard

May 26, 2009 | Microsoft Windows XP Professional

1 Answer

I have a hp laptop with windows vista home premium.i want to work on turboc++, but i am unable to do so. kindly giv your assistance.....


Install the software DOSBox ver 0.72 ( 1.2 MB ) (Freeware) from the link below.

http://prdownloads.sourceforge.net/dosbox/DOSBox0.72-win32-installer.exe?download

Before going to the details u have to create a folder (any name will do). Here we name it as Turbo

Copy the TC into the Turbo folder

Run the DOSBox 0.72 from the icon located on the desktop or from the location of the installation folder

Then u are presented with two screens which look like the command prompt in Windows

Now u are presented with two screens. One with a Z prompt. U can ignore the other screen.

There type the following commands at the command prompt [Z]:

Mount [Type in any alphabet that u wish except z] [Type the source of the turbo C] press enter

Now , Type in the following commands after the Z prompt:

Z: mount d c:\Turbo\ [The folder TC is present inside the folder Turbo]

* Now u should get a message which says: Drive D is mounted as a local directory c:\Turbo\ ***

Now type d: to shift to d: prompt .

D: cd TC [The contents inside the folder Turbo gets mounted as a virtual drive (Here D drive)

D: cd Bin

D: TC or Tc.exe [This presents u the Turbo C++3.0 screen]

On the Turbo C++ goto Options>Directories>Change the source of TC to the source directory [D] ( i.e. virtual D: refers to original c:\Turbo\ . So make the path change to something like D:\TC\include and D:\TC\lib respectively )

===========================================================

In order to get the full screen use the key combination of Alt and Enter

When u exit from the DosBox [precisely when u unmount the virtual drive where Turbo C++ 3.0 has been mounted] all the files u have saved or made changes in Turbo C++ 3.0 will be copied into the source directory(The directory which contains TC folder)

It is a good idea to backup your files in the source directory prior to running DOSBox 0.72

For additional help go through the readme file located in the installation folder or look on the website of the DOSBox forum.

The above procedure has been successfully implemented on Windows Vista Ultimate 64 bit

IMP : Don't use shortcut keys to perform operations in TC because they might be a shortuct key for DOSBOX also . Eg : Ctrl+F9 will exit DOSBOX rather running the code

Mar 07, 2009 | Microsoft Windows Vista Ultimate Edition

1 Answer

About c source code


Here is a simple example:
http://wiki.answers.com/Q/Write_a_C_program_for_simple_interest_calculation

Jan 09, 2009 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

1,004 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

98816 Answers

David Payne
David Payne

Level 3 Expert

14071 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...