// 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 2012-04-15 21:23  飞翔@骑士  阅读(121)  评论(0)    收藏  举报