ejemplo3

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { //Variables necesarias. string nombre; int anio; int edad; //Mensaje al usuario cout << "Escriba su nombre completo: "<<endl; //Lectura de nombre. cin >> nombre; //Otro mensaje al usuario. cout << "Escriba el anio de su nacimiento:" <<endl; //Lectura del año de nacimiento. cin >> anio; //Calculo de la edad. edad = 2021 - anio; //Mostrando el saludo. cout << "Hola "<<nombre<<" usted tiene "<<edad<<" anios de edad"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines