Aquí usamos el switch para que si metemos el valor 1 nos de un resultado y si usamos el 2 nos dé otro.
This one was really easy I only download it and install it.
#include <iostream> #include <string> #include <fstream> #include <sstream> using namespace std; int main (){ string Read; string mid_price; string city_mpg; string high_mpg; int n = 57; float city; float avg_city = 0.0; float high; float avg_high = 0.0; float price; float avg_price = 0.0; ifstream read_file(“93cars.dat.txt”); if (read_file.is_open()){ for (int i =0; i < 93; […]
I didn’t read this WSQ until now. My schedule is only for today because it’s the last day to upload everything, so I’m gonna end the rest of the wsqs and submit my masteries.
#include <iostream> #include <cmath> using namespace std; long double precision( int n, long double e) { if (n == 0){ return ceil (e); } else if (n == 1){ return floor ((e * 10 ) + 0.5) / 10; }else if ( n ==2){ return ceil((e * 100 ) + 0.05) / 100; } else […]
#include <iostream> using namespace std; float raiz (float a){ float x = a / 2; for (int i=0; i <20; i++){ x = .5*(x+(a/x)); } return x; } int main (){ float a, r; cout << “Escribe un numero al que quieras sacarle su raiz cuadrada “; cin >> a; float s = raiz (a); […]
This one was really easy.
This one was really hard but I read soe posts of my classmates to understand it.