Search
 
SCRIPT & CODE EXAMPLE
 

C

how to get input in 2d array in c

#include <stdio.h>

int main(){

    printf("Enter the number of columns");
    int i; 
    scanf("%d", &i);
    printf("Enter the number of rows");
    int y; 
    scanf("%d", &y);

    int r[i][y];
    int a;
    int b;

        for (a=0; a<i; a++){
            for (b=0; b<y; b++){
    scanf("%d",&r[a][b]);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
C :: fopen in c example 
C :: binary to decimal in c 
C :: binary tree in c search 
C :: geom boxplot remove outliers 
C :: hello word in c 
C :: Grepper VSCode Add On 
C :: inputting an array in c 
C :: functions in c 
C :: HOW TO ADD FORM IN BOOTSTRAp 
C :: prime factorization in c 
C :: print hello world in c 
C :: print command for rust unit-test 
C :: add to beginning of array c 
C :: rust cross compile 
C :: c include delay 
C :: macos prevent disk mounting 
C :: iterate through enum in qt 
C :: square in c 
C :: command line arguments c 
C :: convert video to gif with ffmpeg 
C :: script in c 
C :: mc dropout pytorch 
C :: C How to define a union? 
C :: string to number in c 
C :: program in c to print 1 to 100 without using loop 
C :: <fileset joomla 
C :: solidity signature r s v 
C :: extended euclidean algorithm to find x and y 
C :: c program to take array input from user 
C :: which one is faster loop or recursive function? 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =