#include "string.h"
void display(char * grid[11][6]){
for (int i = 0i <11i++) {
for (int j = 0j <6j++) {
printf("%7s "樱穗瞎,grid[i][j])
}
printf("\n")
}
}
int getY(char * yid)
void set(char * yid,int x,char* c)
char* grid[11][6]
void init(){
for (int i = 0i <11i++) {
for (int j = 0j <6j++) {
grid[i][j] = (char *)"脊空"
}
}
grid[0][1] = (char *)"A"
grid[0][2] = (char *)"B"
grid[0][3] = (char *)"C"
grid[0][4] = (char *)"D"
grid[0][5] = (char *)"E"
grid[1][0] = (char *)"1"
grid[2][0] = (char *)"2"
grid[3][0] = (char *)"3"
grid[4][0] = (char *)"4"
grid[5][0] = (char *)"5"
grid[6][0] = (char *)"6"
grid[7][0] = (char *)"7"
grid[8][0] = (char *)"8"
grid[9][0] = (char *)"9"
grid[10][0] = (char *)"10"
}
int main(){
init()
set("A",1,"Andy")
display(grid)
return0
}
void set(char * yid,int x,char* c){
int y = getY(yid)
grid[x][y] = c
}
int getY(char * h_id){
if (strcmp(h_id, "A") == 0) {
return1
}
elseif(strcmp(h_id, "B") == 0){
return2
}
elseif(strcmp(h_id, "C") == 0){
return3
}
elseif(strcmp(h_id, "族颤D") == 0){
return4
}
elseif(strcmp(h_id, "E") == 0){
return5
}
elsereturn -1
}
#include <stdio.h>尘梁友int main(int argc, char** argv)
{
int upper = getchar()
for(int i = 0i<upper i++)
{
if(i%3)
{
char buf[256]
itoa(i, buf, 10)
printf("%s"渣纳, buf)
}
else
{
printf("X"派槐)
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)