Algorítmica Para Programación Ing.docx

  • Uploaded by: gerlen zorilla
  • 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 Algorítmica Para Programación Ing.docx as PDF for free.

More details

  • Words: 312
  • Pages: 4
ALGORÍTMICA PARA PROGRAMACIÓN Ing. Yamil Armando Cerquera [email protected] UNIVERSIDAD SURCOLOMBIANA 84 de 188 Para tales efectos los operadores de relación utilizados en los lenguajes son:Pascal Lenguaje CMayor > >Menor < <Mayor o igual >= >=Menor o igual <= <=Igual = ==Diferente <> !=

if (notafinal <= 69) { cout << "reprobado: "; }

else if ((notafinal >= 70) || (notafinal <= 79)) { cout << "C: ";

} else if ((notafinal >= 80) || (notafinal <= 89)) { cout << "B: ";

}

else { ((notafinal >= 80) || (notafinal <= 89)); cout << "B: ";

}

#include "pch.h" #include<math.h> #include using namespace std; int main() {

int c1, c2, Hipotenusa; int operacion;

cout << endl << "digite el numero de la operacion que deseas realizar: ";

cout << "(1) Hipotenusa" << endl; cout << "(2) cateto" << endl;

cin >> operacion; if ( operacion==1) { cout << "digite c1"; cin >> c1; cout << "digite c2"; cin >> c2; } else { (operacion == 2); cout << "digite la hipotenusa"; cin >> Hipotenusa; cout << "digite a c2"; cin >> c2; }

switch (operacion) { case 1: cout << "La hipotenusa es: " << sqrt((c1 * c1 + c2 * c2)) << endl; break;

case 2: cout << "el cateto es: " << sqrt((Hipotenusa*Hipotenusa c1 * c1)) << endl; break;

default: cout << "Opción no válida" << endl; } cout << "Gracias por utilizar este programa" << endl;

return 0;

}

#include "pch.h" #include using namespace std; int main() { int i, suma; int numero[5]{}; double media = 0.0 ; for (i = 0; i < 5; i++) { cout << "digite un numero "; cin >> numero[i]; suma = numero[i] + + numero[i]; media = numero[i] / 5; cout << "media es :" << media << endl; cout << "Gracias por utilizar este programa" << endl;

}

return 0;

}

Related Documents

Para
June 2020 23
Para
November 2019 54
Para
October 2019 59
Para
October 2019 58
Para
May 2020 36
Para
November 2019 53

More Documents from ""

Ejercicio 2 (1).txt
December 2019 11
Ejercicio 2.txt
December 2019 11
Ejercicio 2 (2).txt
December 2019 16
December 2019 14
December 2019 10
Use Adventureworks2012.docx
December 2019 10