Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions C/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
| Program-60 | Program to print kaprekar number in a given range |
| Program-61 | Program to find the all the prime numbers between the given range. |
| Program-62 | Program to calculate the average of 5 numbers. |



| Program-63 | Program to print Pascal's Triangle. |
| Program-64 | Program to check Armstrong number. |
| Program-65 | Program to Find Transpose of a Matrix |
| Program-66 | Program to find fibonacci series upto n values in C language. |
| Program-67 | Program to calulate all the prime between the range of numbers includes the numbers which is provided. |
| Program-68 | Program to accept 0s and 1s as input and print if it consists 3 consecutive 0s |
| Program-69 | Program to find strong number |
1 change: 1 addition & 0 deletions C/program-3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to find greater of 3 numbers using if
1 change: 1 addition & 0 deletions C/program-4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to fin
1 change: 1 addition & 0 deletions C/program-5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to find largest of three number using nested if condition
1 change: 1 addition & 0 deletions C/program-6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to find largest of three number using ternary operator
1 change: 1 addition & 0 deletions C/program-65/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to Find Transpose of a Matrix
39 changes: 39 additions & 0 deletions C/program-65/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include <stdio.h>
int main() {
int a[10][10], transpose[10][10], r, c, i, j;
printf("Enter rows and columns: ");
scanf("%d %d", &r, &c);

// Assigning elements to the matrix
printf("\nEnter matrix elements:\n");
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
printf("Enter element a%d%d: ", i + 1, j + 1);
scanf("%d", &a[i][j]);
}

// Displaying the matrix a[][]
printf("\nEntered matrix: \n");
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
printf("%d ", a[i][j]);
if (j == c - 1)
printf("\n");
}

// Finding the transpose of matrix a
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
transpose[j][i] = a[i][j];
}

// Displaying the transpose of matrix a
printf("\nTranspose of the matrix:\n");
for (i = 0; i < c; ++i)
for (j = 0; j < r; ++j) {
printf("%d ", transpose[i][j]);
if (j == r - 1)
printf("\n");
}
return 0;
}
File renamed without changes.
File renamed without changes.