// 1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std ;
int main(int argc, char* argv[])
{
int number;
char symbol;
cout <<"Enter a number: ";
cin >>number;
cout <<"Enter a letter: ";
cin.get(symbol); //取前一行末尾'\n'
cin.get(symbol);
cout <<symbol<<endl;
return 0;
}

posted on
浙公网安备 33010602011771号