+ 1

what is wrong in this code?

#include <iostream> using namespace std; int main() { string name = "James"; int age = 42; int height = 185.7; cout << "Name: " << name << endl; cout << "Age: " << age; cout << " | Height: " << height; }

18th Mar 2023, 5:07 AM
Midas
Midas - avatar
4 Respuestas
+ 5
I just realized that int should be replaced with float
18th Mar 2023, 6:02 AM
Midas
Midas - avatar
+ 3
The output is correct shown, what's the problem?
18th Mar 2023, 5:51 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 3
Midas Provide more details What's the expected output?
18th Mar 2023, 5:58 AM
R🍁🇮🇳
R🍁🇮🇳 - avatar
+ 3
Good you solved your problem
18th Mar 2023, 6:03 AM
R🍁🇮🇳
R🍁🇮🇳 - avatar