Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: program to extract data from web sites Pin
Hamid_RT5-Jun-06 3:11
Hamid_RT5-Jun-06 3:11 
GeneralRe: program to extract data from web sites Pin
Tara145-Jun-06 3:28
Tara145-Jun-06 3:28 
QuestionRUNNING SERVICES ON REMOTE MACHINE [modified] Pin
shadrach_india5-Jun-06 2:56
shadrach_india5-Jun-06 2:56 
AnswerRe: RUNNING SERVICES ON REMOTE MACHINE [modified] Pin
sunit55-Jun-06 3:09
sunit55-Jun-06 3:09 
GeneralRe: RUNNING SERVICES ON REMOTE MACHINE [modified] Pin
shadrach_india5-Jun-06 3:12
shadrach_india5-Jun-06 3:12 
GeneralRe: RUNNING SERVICES ON REMOTE MACHINE [modified] Pin
sunit55-Jun-06 3:26
sunit55-Jun-06 3:26 
AnswerRe: Temperature Functions Pin
toxcct5-Jun-06 2:53
toxcct5-Jun-06 2:53 
GeneralRe: Temperature Functions [modified] Pin
klutez1235-Jun-06 3:02
klutez1235-Jun-06 3:02 
This is what I'm trying to use now. I get a declaration syntax error. The complier is old. Turbo C++.
thanks for the time again.


#include <iostream.h>

void convert_to_f()
void convert_to_c()

int main()
{
int temp, fahr, cel, f_out, yes, no, choice, c_out;

do
{
cout<<"Please choose one of the following conversions\n";
cout<<"1 - Celcius to Fahrenheit.\n";
cout<<"2 - Fahrenheit to Celcius.\n";
cout<<"Please select at this time: ";
cin>>temp;

switch(temp)
{ case 1:
void convert_to_f()
break;
case 2:
void convert_to_c()
break;
default:
cout<<"Invalid choice.";
break;
}


cout<<"\nWould you like to recalculate another temperature? '1' for yes, '0' for no: ";
cin>>choice;
}
while(choice==1);

return 0;

}

//function begins
void convert_to_f()
{
cout<<"You choose Celcius to Fahrenheit.\n";
cout<<"Please enter the degrees in Celcius: ";
cin>>cel;
f_out = (cel * 1.8) + 32;
cout<<"The degrees converted into Fahrenheit is "<<f_out<<".";
}
//end function
//new function
void conver_to_c()
{
cout<<"You choose Fahrenheit to Celcius.\n";
cout<<"Please enter the degrees in Fahrenheit: ";
cin>>fahr;
c_out = (fahr - 32) / 1.8;
cout<<"The degrees converted into Celcius is "<<c_out<<".";
}
//end function
GeneralRe: Temperature Functions [modified] Pin
toxcct5-Jun-06 3:04
toxcct5-Jun-06 3:04 
GeneralRe: Temperature Functions [modified] Pin
David Crow5-Jun-06 3:07
David Crow5-Jun-06 3:07 
GeneralRe: Temperature Functions [modified] Pin
klutez1235-Jun-06 3:09
klutez1235-Jun-06 3:09 
QuestionRe: Temperature Functions [modified] Pin
toxcct5-Jun-06 3:10
toxcct5-Jun-06 3:10 
GeneralRe: Temperature Functions [modified] Pin
toxcct5-Jun-06 3:56
toxcct5-Jun-06 3:56 
GeneralRe: Temperature Functions [modified] Pin
klutez1235-Jun-06 14:56
klutez1235-Jun-06 14:56 
GeneralRe: Temperature Functions [modified] Pin
toxcct5-Jun-06 21:19
toxcct5-Jun-06 21:19 
GeneralRe: Temperature Functions Pin
ThatsAlok5-Jun-06 19:20
ThatsAlok5-Jun-06 19:20 
GeneralRe: Temperature Functions [modified] Pin
David Crow5-Jun-06 3:38
David Crow5-Jun-06 3:38 
QuestionA teaser Pin
Alton Williams5-Jun-06 2:37
Alton Williams5-Jun-06 2:37 
AnswerRe: A teaser Pin
toxcct5-Jun-06 2:51
toxcct5-Jun-06 2:51 
GeneralRe: A teaser Pin
Alton Williams5-Jun-06 3:04
Alton Williams5-Jun-06 3:04 
GeneralRe: A teaser Pin
toxcct5-Jun-06 3:10
toxcct5-Jun-06 3:10 
GeneralRe: A teaser [modified] Pin
Alton Williams5-Jun-06 3:16
Alton Williams5-Jun-06 3:16 
AnswerRe: A teaser Pin
Sarath C5-Jun-06 3:10
Sarath C5-Jun-06 3:10 
AnswerRe: A teaser Pin
Viorel.5-Jun-06 3:36
Viorel.5-Jun-06 3:36 
GeneralRe: A teaser Pin
Alton Williams5-Jun-06 3:45
Alton Williams5-Jun-06 3:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.