Thursday, November 19, 2015

Input and Display values in C using Two Dimensional Array



A simple program that I wrote using C language to show basic input and output using Two dimensional array as our data structure in C programming language.


If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing

#include <stdio.h>

main()
 {
     int value[3][2],a=0,b=0;


     for (a=0; a<3; a++)
        {
       for (b=0; b<2; b++) {
        printf("Enter value in item no. %d :",value[a][b]);
        scanf("%d",&value[a]);
         }
     }
     printf("\n\n");
     printf("List of values you have given");
     printf("\n\n");
     for (a=0; a<3; a++)
        {
       for (b=0; b<2; b++) {
        printf(" %d ",value[a][b]);
         }
     }
     printf("\n\n");
     system("pause");
 }

No comments:

Post a Comment