#include <iostream>
int main() {
// c++ primer pg 39
// take two values and print all numbers in the range specified by the input
int v1=0,v2=0;
int lower=0,upper=0;
std::cout << "Enter two values: " << std::endl;
std::cin >> v1 >> v2;
if (v1>v2) {
upper=v1;
lower=v2;
}
elseif (v1<v2) {
upper=v2;
lower=v1;
}
else {
upper=v1;
lower=v1;
}
while (lower<=upper) {
std::cout << lower << " " << std::endl;
++lower;
}
}
get currVal
currVal.count=1
get val (*)
if currVal=val
currVal.count++
go to (*)
else
print currVal.count
set currVal=val
currVal.count=1
go to (*)
print currVal.count
Exercise 1.23: Write a program that reads several transactions and counts
how many transactions occur for each ISBN .
Exercise 1.24: Test the previous program by giving multiple transactions
representing multiple ISBN s. The records for each ISBN should be grouped
together.