『壹』 編寫c語言程序汽車的車牌號有7個字元為首的字元限定為";京:
/*
京A123C5 : 後五位有非規定字元!
津H88659 : 非歸屬地車牌!
京B1234 : 車牌號碼長度錯誤!
京AA12343 : 車牌號碼長度錯誤!
京A88880 : OK!
京C8865C : 後五位有非規定字元!
Press any key to continue
*/
#include<iostream>
#include<cstring>
usingnamespacestd;
#defineMAXLEN8
intCheckPlateNumber(charplatenumber[]){
inti;
charbelonging[5];
if(strlen(platenumber)!=8)return1;//編碼長度錯誤
belonging[0]=platenumber[0];
belonging[1]=platenumber[1];
belonging[2]='