Preview Cheat Sheet
HIDE
Cheat Sheet Editor #include <stdio.h>
#define MAX 10
void convertToSparse(int matrix[MAX][MAX], int row, int col) {
Online Cheating notes editor for exams
int sparse[MAX * MAX][3];
int k = 0;
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if (matrix[i][j] != 0) {
sparse[k][0] = i;
sparse[k][1] = j;
Start writing your exam cheat sheet in the editor below
sparse[k][2] = matrix[i][j];
k++;
}
}
Pick the font size and the line height. Letter 5 is recommended for }
printf("\nSparse Matrix (Row Col Value):\n");
exams
for (int i = 0; i < k; i++) {
printf("%d %d %d\n", sparse[i][0], sparse[i][1], sparse[i][2]);
}
Resize the exam cheat sheet by grabbing and moving the bottom right
}
int main() {
int matrix[MAX][MAX];
holder of the cheat sheet preview at the right side int row, col;
printf("Enter rows and columns: ");
Add more cheat sheets by pressing (+)
scanf("%d %d", &row, &col);
printf("Enter matrix values:\n");
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
scanf("%d", &matrix[i][j]);
}
}
convertToSparse(matrix, row, col);
return 0;
}
#include <stdio.h>
#define MAX 10
void convertToSparse(int matrix[MAX][MAX], int row, int col) {
int sparse[MAX * MAX][3];
int k = 0;
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if (matrix[i][j] != 0) {
sparse[k][0] = i;
sparse[k][1] = j;
sparse[k][2] = matrix[i][j];
k++;
}
}
}
printf("\nSparse Matrix (Row Col Value):\n");
for (int i = 0; i < k; i++) {
printf("%d %d %d\n", sparse[i][0], sparse[i][1], sparse[i][2]);
}
}
int main() {
int matrix[MAX][MAX];
int row, col;
printf("Enter rows and columns: ");
scanf("%d %d", &row, &col);
printf("Enter matrix values:\n");
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
scanf("%d", &matrix[i][j]);
}
}
convertToSparse(matrix, row, col);
return 0;
}
Print Cheat Sheet
🙊
Discover the new hidden camera for exams Monorean Cam: