Skip to content

Instantly share code, notes, and snippets.

View nahiyan's full-sized avatar

Nahiyan Alamgir nahiyan

View GitHub Profile
// Copyright BDH Lab 2018
#include <iostream>
#include <string>
using std::cout;
using std::string;
// IO class
class IO {
string output;
#include <stdio.h>
#define W 3
#define H 2
void inputMatrix (int matrix[H][W]) {
int i, j;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
scanf("%d", &matrix[i][j]);
}
#include <stdio.h>
// 1 2 3 4 5
// 1 3 4 5 -1
void deleteItem (int list[], int z, int index) {
int i = index;
while (i < z) {
if ((i + 1) < z) // if there's an item on the left
list[i] = list[i + 1];
else