#include <iostream>

#include <string>
using namespace std;
int main()
{
       void PrintChar(char name[][30],int n);
       void PrintString(string name[],int n);
       void PrintOut(char * name[],int n);
 
       cout<<"Input 3 names(by char):"<<endl;
       char name[3][30];
       for(int i=0;i<3;i++)
       {
              cin>>name[i];//******用字符数组来接收*******
       }
       PrintChar(name,3);
 
       cout<<"Input 3 country(by string):"<<endl;
       string country[3];
       for(int j=0;j<3;j++)
       {
              cin>>country[j];//******用字符串数组来接收*******
       }
       PrintString(country,3);
 
       cout<<"Input 3 subject(by *):"<<endl;
       //char * subject[3];//没办法控制每个指针的长度。
       //for(int k=0;k<3;k++)
       //{
       //     cin>>subject[k];/
       //}
       char * subject[]={"ASP.NET","UML","PHP"};
       PrintOut(subject,3);
       return 0;
}
//打印字符
void PrintChar(char name[][30],int n)
{
       for(int i=0;i<n;i++)
       {
              cout<<name[i]<<endl;
       }
}
//打印字符串
void PrintString(string name[],int n)
{
       for(int i=0;i<n;i++)
       {
              cout<<name[i]<<endl;
       }
}
//打印指针
void PrintOut(char * name[],int n)
{
       for(int i=0;i<n;i++)
       {
              cout<<name[i]<<endl;
       }
}