Quizz #06

q1.cpp

#include <iostream> // Juan de Dios Durán Hernández A01631134
#include <math.h>
using namespace std;
long superpower (long a, long b){
return pow(a,b);}
int main (){
long a;
long b;
cout << “elevar un numero a otro numero” << endl;;
cout << “Introduce el primer numero= “;
cin >> a;
cout << “Introduce el segundo numero= “;
cin >>b;
cout << “total= ” << superpower (a,b);
cout << endl;
return 0;
}

q2.cpp

#include <iostream> //Juan de Dios Durán Hernández A01631134
using namespace std;
void stars (int x){
for (int i=0; i<x; i++){
cout <<“*”;
}
}
int main(){
int x;
cout << “introduce el numero de estrellas que quieres= “;
cin >> x;
stars (x);
return 0;
}

Github

https://github.com/juande1097/WSQ/blob/master/quizz%20%2306

CC BY 4.0 Quizz #06 by juande1097 is licensed under a Creative Commons Attribution 4.0 International License.