Looking for an explanation for each UNDERLINE line.

profileBob_Usher

#include <stdio.h>


    float tada[4][7]={

        {3.1,4.6,10.5,9.7,12.9,5.5,23.0},

        {11.3,-7.7,12.9,1.1,6.6,80.9,50.5},

        {4.4,-2.2,60.5,2.8,7.0,7.0,55.5},

        {6.2,-8.2,6.8,2.5,77.1,19.0,5.5},};

    int r,c, a;


int main()

{

while(1)

{

printf("colum.....1\nrow......2\n");

        scanf("%d",&a);



        if(a==1)

        {

            printf("choose colum 0 through 6\n");

            scanf("%d", &c);

            for(r=0; r<4; r++)

            {

                printf("%f ", tada[r][c]);


   }

}



if(a==2)

{

            printf("choose row 0 through 4\n");

            scanf("%d", &r);

            for(c=0; c<7; c++)

            {

                printf("%f ", tada[r][c]);


   }

} printf("\n");

}


}






    • 7 years ago
    • 5
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      c-arr-exp1.zip