Listing 2

// naive_to_upper.cpp
#include <iostream>
#include <cctype>

using namespace std;

int main() {
  char c;
  while (cin.get(c)) { cout.put(toupper((unsigned char)c)); }
  return 0;
}