• Source
    1. //Uso del ciclo if y else
    2. #include <iostream>
    3. using namespace std;
    4.  
    5. int main()
    6. {
    7. int nota;
    8. cout << "Ingrese el valor de su nota (de 0-20): ";
    9. cin >> nota;
    10.  
    11. if(nota >= 11)
    12. {
    13. cout << "Usted esta aprovado.\n";
    14. }
    15. else
    16. {
    17. cout << "Lo sentimos mucho!.Usted ha sido desaprovado.\n";
    18. }
    19. return 0;
    20. }