Need help?

sry really new to this

Write a C++ program that inputs a character, integer, and float type and then outputs the values



#include <iostream>
using namespace std;

int main()
{
int i;
float fl;
char ch;
cout << "Please enter an integer: ";
cin >> i;
cout << "Please enter a float: ";
cin >> fl;
cout << "Please enter a character: ";
cin >> ch;
cout << "Character: " << ch << endl;
cout << "Float: " << fl << endl;
cout << "Integer: " << i << endl;
}
You should use [code] tags.

What is the question? The only thing I see wrong is no return for main.
Yea just put a system("pause") or something and return 0; at the end of main.
Last edited on
Topic archived. No new replies allowed.