I am learning c ++ and the truth is that I do not find the solution to my problem:
I want to create a program that asks for name and age, and that in case you enter the correct name (Dan), one thing comes up, and if not, then another one.
#include <iostream>
using namespace std;
int main()
{
int edad, nombre, Dan;
cout << "introduce tu nombre y tu edad \n";
cin >> edad >> nombre;
if (nombre == Dan && edad >= 18) {
cout << "Eres el verdadero Dan \n";
}
else {
cout << "No eres el verdadero Dan \n";
}
system("PAUSE");
return 0;