Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1994

Exercise - Book Programming-Principles-and-Practice-Using-C++

$
0
0
I'm Brazilian. I try to implement a very simple exercise from the book Principles and Practices of Programming with C ++, the statement is as follows:
1. Write a program that consists of a while loop that reads (at each loop iteration) two ints and then prints them out. End the program when a '|' is read.

Here is my code:
Code:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
    vector<int>num;
    int temp;
    int i=0;
    cout << "Write 2 numbers: \n";
    while (...
Exercise - Book Programming-Principles-and-Practice-Using-C++

Viewing all articles
Browse latest Browse all 1994

Trending Articles