Ad Code

NEW POST

6/recent/ticker-posts

Ganapathy the Mathematics professor distributed the answer sheets for his students after the examination.

 Ganapathy the Mathematics professor distributed the answer sheets for his students after the examination.


#include <stdio.h>

int main()

{int noofrowsinclass,i,j;

scanf("%d",&noofrowsinclass);

for(i=1;i<=noofrowsinclass;i++)

{

    for(j=1;j<=i;j++)

    {

        if(i%2==0)

        {

            printf("Fail ");

        }

        else

        {

            printf("Pass ");

        }

    }

    printf("\n");

}


return 0;

}

Post a Comment

0 Comments