claudio torres
Quiz by , created more than 1 year ago

IF/Else

9
0
0
claudio torres
Created by claudio torres over 5 years ago
Close

IF/Else

Question 1 of 5

1

¿Para que sirve un if/ else en C++?

Select one or more of the following:

  • Sirve para la entrada de datos

  • Sirve para la salidade datos

  • Sirve realizar decisiones simples en el flujo del programa

  • Sirve para insertar archivos

Explanation

Question 2 of 5

1

¿Que va primero in if o else?

Select one or more of the following:

  • If

  • else

Explanation

Question 3 of 5

1

¿Como complementarias este programa para saber si es hombre o mujer con if?
#include<iostream>
#include<stdlib.h>
using namespace std;
int main(){
int varable;
cout<<"Que eres hombre o mujer?"<<endl;
cout<<"Escribe 1 si eres hombre"<<endl;
cout<<"Escribe 2 si eres mujer"<<endl;
cin>>variable;

Select one of the following:

  • if(variable==1){
    cout<<"OK ERES HOMBRE"<<endl;
    }else
    if(vaieable==2){
    cout<<"OK ERES MUJER"<<endl;
    }

  • if(variable=1){
    cout<<"OK ERES HOMBRE"<<endl;
    }else
    if(vaieable=2){
    cout<<"OK ERES MUJER"<<endl;
    }

  • if(variable==1){
    cout<<"OK ERES HOMBRE"<<endl;
    if(vaieable==2){
    cout<<"OK ERES MUJER"<<endl;
    }
    }

  • (variable==1){
    cout<<"OK ERES HOMBRE"<<endl;
    }else
    (vaieable==2){
    cout<<"OK ERES MUJER"<<endl;
    }
    }

Explanation

Question 4 of 5

1

¿Es un ciclo if/else?

Select one of the following:

  • Si

  • No

Explanation

Question 5 of 5

1

¿Que librerías se necesita para usar if/else en C++?

Select one or more of the following:

  • #include<iostream>

  • #include<stdlib.h>

  • Ninguna, el IDE ya los incluye

  • #include<math.h>

Explanation