Search
 
SCRIPT & CODE EXAMPLE
 

C

print in c 11111 00000 11111 00000 11111

/**
 * C program to print number pattern of 1, 0 at even/odd rows
 */

#include 

int main()
{
    int rows, cols, i, j;

    /* Input rows and columns from user */
    printf("Enter number of rows: ");
    scanf("%d", &rows);
    printf("Enter number of columns: ");
    scanf("%d", &cols);

    for(i=1; i<=rows; i++)
    {
        for(j=1; j<=cols; j++)
        {
            printf("%d", (i%2));
        }

        printf("
");
    }

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: retoure a la ligne C 
C :: ansi c function array of strings parameter 
C :: <fileset joomla 
C :: leer string en c 
C :: c to assembly online compiler 
C :: C #if, #elif and #else Directive 
C :: delimter in c 
C :: C Assigning addresses to Pointers 
C :: how to make C program blink on screen 
C :: how to stop aws alb temporarily 
C :: how to output in green in c 
C :: kleiner gleich zeichen MAC 
C :: My name is c 
C :: Entering raw mode 
C :: list fiter octobercms 
C :: WARNING: QA Issue: rdepends on 
C :: Integer Input/Output 
C :: sadsa 
C :: laarvel artisan to create controller model miigration 
C :: print number in c 
C :: online c compiler with mpi 
C :: declaration of arrays 
C :: C do...while loop 
C :: write to console c 
Dart :: flutter listtile shape border 
Dart :: clickable container flutter 
Dart :: flutter text hint 
Dart :: flutter checkbox 
Dart :: target of uri doesn 
Dart :: ce button on calculator dart 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =