Fandom

Scratchpad

PLE:Unidad4Ejercicio18

215,990pages 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:       Unidad4Ejercicio18.cpp
Descripción:    Utiliza las funciones de <cctype>.
*/
#include <iostream>
#include <cmath>
#define PI 3.14159265
using namespace std;

void main ()
{
        double angulo, res;

        cout << "Introduzca un angulo (en grados) ";
        cin >> angulo;

        angulo = angulo * PI / 180;

        cout << "El angulo expresado en radianes es = " << angulo << endl;

        res = sin(angulo);
        cout << "El seno de " << angulo << " radianes ";
        cout << "es igual a " << res << endl;

        res = cos(angulo);
        cout << "El coseno de " << angulo << " radianes ";
        cout << "es igual a " << res << endl;

        res = tan(angulo);
        cout << "La tangente de " << angulo << " radianes ";
        cout << "es igual a " << res << endl;

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

Also on Fandom

Random wikia