I am having a bit of trouble, in class I am using Turbo C++ in which I can copile my code so it can become a executable file. Problem is the professor gave us a source to use but the program isnt Turbo C++ it is Microsoft Devlopment Enviroment. Iam creating a program in which I have to input an integer "ie: 25" and that number has to come out in decimal, hexidecimal and ascii character forms. In addition the program must be able to use a floating-point number and output it in floating point and scientific format.
This is what i have so far:
#include<iostream.h>
#include<iomanip.h>
main()
{
int x;
char x;
do {
cout << "Number as decimal: " << dec << x;
cin >> x;
cout << "Number as hexadecimal: " << hex << x;
cin >> x;
cout << "Number as character: x"
cin >> x;
<< moderator edit: added code tags: [code][/code] >>
I know this mesage is long bare with me..
Also I have to act as if i work for the phone company and output several call durations "such as 45,43,12,17,78"
and I have to categorize them as "shorstest call, longest call, count the total number of calls made and the avergage of a call on the list"
for this one i have this:
#include<iostream.h>
#include<iomanip.h>
main()
{
int a, b, c,d,e,f;
do {
cout << "Enter first call: ";
cin >> a;
cout << "Enter second call: ";
cin >> b
..you get the idea
cout << "Enter longest calls made: ";
cin >> a;
cout << "Enter shortest calls made: ";
cin >> b
similar as before
I want to know if Iam on the right track or am I off the main focus of the program itself. If I am off then can anyone please help me out.