output is not that one which is desired

I am writing this beginner's code in C++ in order to get acquainted with variable types, but when I compile and run this code, I am not getting an output as I desire, I want to get an output that looks like this: "The winning time in heat C of event 5 was 27.250000.".
But the output after compiling the below code is like this "The winning time in heat Cof event was 527.25". What seems to be the problem in my code, please make a correction for me, C++ gurus...
1
2
3
4
5
6
7
8
9
10
11
12
13
  #include <iostream>
using namespace std;
int main(int argc, char** argv) {
	int event;
	char heat;
	float time;
	event = 5;
	heat = 'C';
	time = 27.25;
	cout << "The winning time in heat " << heat;
	cout << "of event was " << event << time;
	return 0;
}
line 11:
 
cout << " of event was " << time;
no, you are somewhat wrong, I want the "event" variable's value to also be printed after the string "of event"... How can I do that?
cout << " of event " << event << " was " << time;
Now it works... Thanks... :-)
Topic archived. No new replies allowed.