很简单的一道题
本人刚学C++两天遇到一道很简单的题不会写~~~请各位帮帮忙!谢谢编写一个要求用户键入邀请赴宴的人数(不包括用户)的程序,假如键入的人数为N,显示消息"A table for(n+1)is ready.".例如键入3则显示"A table for 4 is ready"
#include <iostream>
using namespace std;
int main() { int a; cout <<"请输入客人数量: "; cin >>a; cout <<endl <<"A table for " <<a+1 <<" is ready."; }
#include <iostream.h> void main()
{ int n; cout<<"ÊäÈë¿ÍÈËÊýn="; cin>>n; cout<<"A table for "<<n+1<<" is ready"<<endl; }