我需要将行作为列。我该怎么做呢?

时间:2018-04-05 02:51:36

标签: php mysql html5 phpmyadmin

我将输出作为行但我需要它们像列一样。

我需要结果像列一样。 SID和其他人作为一列和$ arr []以及其他列,都必须并排

#include <stdio.h>

int main()
{
    int validity, pos; //validity 0:not valid, repeat the loop; validity 1: valid number
    char enter;

    while (validity == 0) {
        printf("Player1 1, type the position in hexadecimal (1 to f):\n");
        scanf(" %x%c", &pos, &enter); //here, the number pos is already in decimal

        if (pos == NULL){
            pos = 99; //if the letter typed is improper, I set 99, because is out of range
        }

        if(pos<=15 && pos >=0){
            validity = 1;
        } else {
            printf("Invalid number, out of range\n");
            validity = 0;
        }
    }
}

0 个答案:

没有答案