219,272pages on
this wiki
Add New Page
Discuss this page0 Share
Programa:       Ejercicio2.cpp
Fecha:          11/10/2007
Descripción:    Programa conversión de tipos  explícita
#include <iostream>
using namespace std;
void main()
        int a;
        float b;
        double c;
        cout << "Introduzca un entero ";
        cin >> a;
        cout << "Introduzca un real simple ";
        cin >> b;
        c = a*b;
        cout << "Multiplicación sin conversión de tipo = ";
        cout << c << endl;
        c = (int) a*b;
        cout << "Multiplicación con conversión de tipo = ";
        cout << c << endl;
        c = (int) (a*b);
        cout << "Multiplicación con conversión de tipo sobre el producto = ";
        cout << c << endl;

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.

Also on Fandom

Random wikia