Can all the computer programmers please read!!! I have a question for you.
I just took this computer programming course and I do not understand the C language at all. Can someone help me out and type up a source code for me that runs on Borlands C++. I know this is bad for me but C++ is very abstract to me. It's a piece of cake to the master programmers out there. Help would be appreciated! 
Temperatures are given in Fahrenheit and Celsius units. The conversion equation is celsiusValue = 5/9(fahrenheitValue - 32)
Write a complete program that prompts for input of a Fahrenheit temperature and outputs the equivalent Celsius value.
Sample:
Input: Enter Fahrenheit temperature, 98.6
Output: Celsius temperature is 37.0

Temperatures are given in Fahrenheit and Celsius units. The conversion equation is celsiusValue = 5/9(fahrenheitValue - 32)
Write a complete program that prompts for input of a Fahrenheit temperature and outputs the equivalent Celsius value.
Sample:
Input: Enter Fahrenheit temperature, 98.6
Output: Celsius temperature is 37.0
I didn't really expect a reply or answer from someone. I though it would just be a flame war for me to do my own hw. HEHE thanks Tim!
Yes I think it is a "object-oriented C++ program." I compiled this with Visual C++ with no errors do you think there's any problems here Tim? How do I run this thing? Yes I know you're going to make fun of me for my unintelligent comments, but my prof. force me to put them there. Will this run if it compiles with no errors? And when I define the integer C is it correctly stated? Do spacing between: *+-/%, matter? Thanks a lot!
// CS107 - Spring 2002 - Assignment #2 - Wed 9 am
// define cin and cout stream objects
#include <iostream.h>
int main()
{
int f, c;
// prompt for integer
cout << "Enter Fahrenheit temperature,";
cin >> f; // read integer f
c = (5 / 9) * (f - 32); // defines integer
cout << "Celsius temperature is " << c; // outputs conversion
return 0;
}
Yes I think it is a "object-oriented C++ program." I compiled this with Visual C++ with no errors do you think there's any problems here Tim? How do I run this thing? Yes I know you're going to make fun of me for my unintelligent comments, but my prof. force me to put them there. Will this run if it compiles with no errors? And when I define the integer C is it correctly stated? Do spacing between: *+-/%, matter? Thanks a lot!// CS107 - Spring 2002 - Assignment #2 - Wed 9 am
// define cin and cout stream objects
#include <iostream.h>
int main()
{
int f, c;
// prompt for integer
cout << "Enter Fahrenheit temperature,";
cin >> f; // read integer f
c = (5 / 9) * (f - 32); // defines integer
cout << "Celsius temperature is " << c; // outputs conversion
return 0;
}
or
// CS107 - Spring 2002 - Assignment #2 - Wed 9 am
// define cin and cout stream objects
#include <iostream.h>
int main(int, char**)
{
int f;
// prompt for integer
cout << "Enter Fahrenheit temperature,";
cin >> f; // read integer f
cout << "Celsius temperature is " << (5 / 9) * (f - 32); // outputs conversion
return 0;
}
// CS107 - Spring 2002 - Assignment #2 - Wed 9 am
// define cin and cout stream objects
#include <iostream.h>
int main(int, char**)
{
int f;
// prompt for integer
cout << "Enter Fahrenheit temperature,";
cin >> f; // read integer f
cout << "Celsius temperature is " << (5 / 9) * (f - 32); // outputs conversion
return 0;
}
if you want C....since those guy wrote C++...i thought i read "in C"
void main()
{
int f, c;
printf("Enter Fahrenheit temp");
scanf("%lf", &f);
c = ((5/9) * (f - 32));
printf("Celcius Temp is %f", c);
}
void main()
{
int f, c;
printf("Enter Fahrenheit temp");
scanf("%lf", &f);
c = ((5/9) * (f - 32));
printf("Celcius Temp is %f", c);
}
This is getting beyond my knowledge, if I copied any of the things you guys wrote I would be expelled from my college for plagarism. HEHE
Just wanted to know whether the source code I have right now works or not?
Just wanted to know whether the source code I have right now works or not?
Trending Topics
Oh go on then..... (In Java
)
package RSXTypeR;
import RSXTypeR.numberConvert.*;
import java.io.*;
public class RSXTypeRHomeWork {
public static void main(String[] args)
{
System.out.print("Enter temp in F : ");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String input = reader.readLine();
TemperatureConverter tc = new tc(input, tc.FAHRENHEIT );
System.out.println("Temperature in Celcius: " + tc.celcius());
}
}
Now then RSX, implement the class TemperatureConverter.....
)package RSXTypeR;
import RSXTypeR.numberConvert.*;
import java.io.*;
public class RSXTypeRHomeWork {
public static void main(String[] args)
{
System.out.print("Enter temp in F : ");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String input = reader.readLine();
TemperatureConverter tc = new tc(input, tc.FAHRENHEIT );
System.out.println("Temperature in Celcius: " + tc.celcius());
}
}
Now then RSX, implement the class TemperatureConverter.....



