一个编程问题

来源:百度知道 编辑:UC知道 时间:2024/05/28 05:28:44
有个矩阵竖牌12个列从1到12,横排从A到G七排.对应了7*12个数据,如A5,G3等,要求编一个程序,输入如A4G2D8.输出即A4,G2,D8里面的数据,应该清楚了吧,要源码,C DELPHI BASIC甚至做成ASP+数据库(这种方式应该不难)的方式也行,数据要我能自己输入的,请发到我邮箱里面lxyx520123@163.COM事成有加分,谢谢

#include<iostream.h>
void main(void)
{
float G[6][11];
int r=0;
int c=0;
for(r=0;r<7;r+=1)
{
for(c=0;c<12;c+=1)
{ cout<<"please input : G["<<r+1<<"]["<<c+1<<"]"<<endl;

cin>>G[r][c];
}
}

cout<<"please input the number you want!"<<endl;
cout<<"the r number : "<<endl;
cin>>r;r=r-1;
cout<<"please input the c number:"<<endl;
cin>>c;c=c-1;
cout<<" this is the number you want: "<<G[r][c]<<endl;
}
未调试的劣作~