Saturday, March 16, 2019

Problem Solving through Programming in C
           Week-07 Program

Week-07 Program-01
int i=0;
   while (ch[i]!='\0')
   {
      if (ch[i]>='A'&&ch[i]<= 'Z')
         upper++;
      if (ch[i]>='a'&&ch[i]<='z')
         lower++;
      i++;
   }

Week-07 Program-02

for(i=0;i<r;i++)
{int sum=0;
  for(j=0;j<c;j++)
  {
    sum=sum+matrix[i][j];
  }
  printf("%d\n",sum);
}
return 0;
}

Week-07 Program-03

for(i=0; i<row; i++)
    {
        for(j=0; j<col; j++)
        {
            matrix_C[i][j]=matrix_A[i][j]-matrix_B[i][j];
        }
    }

for(i=0; i<row; i++)
    {
        for(j=0; j<col; j++)
        {
            printf("%d ", matrix_C[i][j]);
        }
  printf("\n");
    }
return 0;
}

Week-07 Program-04

for(i=0;i< r;i++)
    {
        for(j=0;j<r; j++)
        {  if(i<j)
          printf("0 ");
         else
           printf("%d ",matrix[i][j]);
        }
  printf("\n");
    }

return 0;
}

No comments:

Post a Comment

  ASE   INTRODUCTION TO PROGRAMMING ASSIGNMENT MARKS Click the link for Marks