(17-sep-2018) Santiago Torres.docx

  • Uploaded by: Santi Tellez
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View (17-sep-2018) Santiago Torres.docx as PDF for free.

More details

  • Words: 323
  • Pages: 2
Ejercicio 1- errores //Programa que calcula el area de un triangulo /*Entrada base, altura float Proceso Salida area float Santiago torres tellez */ #include using namespace std; int main() { float base, altura, area; cout << "digite el valor de la base: "; cin >> base; cout << "digite el valor de la base: "; cin >> altura; area = base * altura / 2; cout << "el area del triangulo es" << area << " m2” << end; system("pause"); return 0; }

Ejercicio 02- uso de operadores aritméticos /*Problema: Realizar operaciones Entrada: Proceso: Salida: Nombres: Santiago Torres Tellez Fecha: Sep 27 2018 */ #include using namespace std; int main() { cout << " 7 + 4 =" << 7 + cout << " 7 - 4 =" << 7 cout << " 7 * 4 =" << 7 * cout << " 7 / 4 =" << 7 / cout << " 7 DIV 4 =" << 7 cout << " 7 MOD 4 =" << 7 system("pause"); return 0; }

aritmeticas

4 << endl; 4 << endl; 4 << endl; 4.0 << endl; / 4 << endl; % 4 << endl;

Ejercicio 03 funciones /*Problema: Resolver expresiones usando funciones Entrada: a float Proceso: Salida: b float Nombres: Santiago Torres Tellez Fecha: Sep 27 2018 */ #include # define PI 3.1415926 using namespace std; int main() { float a, b; setlocale(LC_CTYPE, "spanish"); cout << "Digite el valor de a"; cin >> a; b = pow(a, 3) + pow(a, 2) + 3; cout << " Expresión (1) = " << b << endl; b = pow(a, 1/3.0) + pow(a, 1/2.0) + 3; b = cbrt(a) + sqrt(a) + 3; cout << "Expresión (2a) = " << b << endl; cout << "Expresión (2b) = " << b << endl; b = sin(2 * PI / 6); cout << "Expresión (3) = " << b << endl; system("pause"); return 0; }

Related Documents

Santiago
December 2019 49
Doctores Santiago
November 2019 32
20021013_h_camino Santiago
November 2019 19
Plano Santiago
May 2020 6
Santiago Calatrava1
November 2019 12
Santiago Calatrava
May 2020 12

More Documents from ""