Fandom

Scratchpad

PLE:Unidad22Ejercicio12

216,082pages on
this wiki
Add New Page
Discuss this page0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

/*
Programa:       Unidad2Ejercicio12.cpp
Fecha:          24/10/2006
Descripción:    Lee una nota numérica y la muestra en formato alfabético
*/
#include <iostream>
using namespace std;
void main ()
{
        int nota;

        do
        {
                cout << "Introduzca una nota ";
                cin >> nota;
        } while(nota > 10 || nota < 0);

        switch(nota)
        {
                case 0:
                case 1:
                case 2:
                case 3:
                case 4: cout << "insuficiente";
                        break;
                case 5: cout << "suficiente";
                        break;
                case 6: cout << "bien";
                        break;
                case 7:
                case 8: cout << "notable";
                        break;
                case 9:
                case 10: cout << "sobresaliente";
                        break;
                default: cout << "Nota no válida";
        }

        cin.ignore();
        cin.get();
}

Also on Fandom

Random wikia