Dev - C++ - Como hacer esto en c++?

 
Vista:

Como hacer esto en c++?

Publicado por Jose (1 intervención) el 26/01/2018 18:51:26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**********************************************************************
* Main will not do much here.  First it will display Peter's question,
* then it will display the Lord's answer
***********************************************************************/
int main()
{
   // ask Peter's question
   questionPeter();
 
   // the first part of the Lord's response
   cout << "Jesus saith unto him, I say not unto thee, Until seven\n";
   cout << "times: but, Until " << responseLord() << ".\n";
 
   return 0;
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 417
Ha mantenido su posición en Dev - C++ (en relación al último mes)
Gráfica de Dev - C++

Como hacer esto en c++?

Publicado por Thanatos (199 intervenciones) el 26/01/2018 23:41:50
Según el enunciado del libro, Procedural Programming in C++, la salida que se espera del programa es:

salida


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**********************************************************************
 * Main will not do much here. First it will display Peter's question,
 * then it will display the Lord's answer
 ***********************************************************************/
 
#include <iostream>
#include <string>
 
using namespace std;
 
void questionPeter(void);
int responseLord(void);
 
int main()
{
    // Ask Peter's question
    questionPeter();
 
    // The first part of the Lord's response
    cout << "Jesus saith unto him, I say not unto thee, Until seven\n";
    cout << "times: but, Until " << responseLord() << ".\n";
 
    return 0;
}
 
void questionPeter()
{
    cout << "Lord, how oft shall my brother sin against me, and I forgive him?\n"
         << "Till seven times?\n";
}
 
int responseLord()
{
    return 70 * 7;
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Como hacer esto en c++?

Publicado por Julio (6 intervenciones) el 27/01/2018 01:26:52
Excelente pagina, muy buena la puedo recomendar
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar