I have to put an integer, a real, a character and a sentence containing spaces up to 100 characters. I tried to make the solution but I can only type the numbers and the character and the string are not coming out.
#include<iostream>
#include<iomanip>
using namespace std;
int numero;
float real;
char carac;
string frase;
int main(){
cin>>numero;
cin>>real;
cin>>carac;
getline(cin,frase);
cout<<numero;
cout<<fixed;
cout.precision(6);
cout<<real<<carac<<frase<<endl;