Skip to content

Instantly share code, notes, and snippets.

View IAFahim's full-sized avatar
🎮
Focusing

Md. Ishtiaq Ahamed Fahim IAFahim

🎮
Focusing
View GitHub Profile
#include<stdio.h>
#include<string.h>
struct student
{
char name[25];int id;int cgpa;
};int i=0;
struct student scan_and_print();
void main(){
struct student one=scan_and_print();
struct student two=scan_and_print();
#include<stdio.h>
#include<string.h>
void _date_scraper(int size){
char edir[]=":Mm.PpAa ";
float v_edir[]={5,2,2,4,2,2,2,2,1};
float flag=0;
char temp[]="2am ki google am my god where i am 1230 uttara Dhaka pleaze let me in pizz papa dsdsdasdadsadsafsdfdsvxcv u 11:60 is big money mam k 12:30 AM k 12.30 ~";
int i=0,j=0,till=0,found=0,p_till=0;
#include <stdio.h>
int main() {
int a,aa,b,bb,i,till;
scanf("%d",&till);
for (int j = 0; j < till; j++)
{
scanf("%d %d",&a,&b);
if(a<b){
int temp=b;
b=a;
@IAFahim
IAFahim / Main.java
Last active September 12, 2021 04:59
CSE215 Lab Final Task A
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc=new Scanner(System.in);
File file = new File("residents.txt");
sc = null;
@IAFahim
IAFahim / Main.java
Created September 12, 2021 04:58
CSE215 Lab Final Task B
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
double price=sc.nextInt();
double discount=sc.nextInt();
PercentageDiscount percentageDiscount=new PercentageDiscount(discount);
@IAFahim
IAFahim / toString Generator
Last active September 12, 2021 07:24 — forked from jenslohmann/toString Generator
Java toString() generator for IntelliJ IDEA that generates JSON
public java.lang.String toString() {
#if ( $members.size() > 0 )
#set ( $i = 0 )
return "{\"_class\":\"$classname\", " +
#foreach( $member in $members )
#set ( $i = $i + 1 )
#if ( $i == $members.size() )
#set ( $postfix = "+" )
#else
#set ( $postfix = "+ "", "" + " )
@IAFahim
IAFahim / isPrime.java
Last active September 24, 2021 11:30
isPrime Java
public static boolean isPrime(int x) {
if (x <= 1) return false;
if (x == 2 || x == 3 || x == 5) {
return true;
}
if (x % 2 == 0 || x % 3 == 0 || x % 5 == 0) {
return false;
}
int sqrt = (int) Math.floor(Math.sqrt(x));
for (int i = 6; i <= sqrt; i += 6) {
@IAFahim
IAFahim / reverse.go
Created January 28, 2022 17:10
reverse byte form a-b
func reverse(arr []byte, start, end int) {
for i, j := start, end-1; i < end/2; i, j = i+1, j-1 {
arr[i], arr[j] = arr[j], arr[i]
}
}
@IAFahim
IAFahim / template.vm
Last active February 1, 2022 11:59
Golang problem solving template
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@IAFahim
IAFahim / dfs.go
Created February 9, 2022 15:47
find path
type Dfs struct {
dX []int
dY []int
grid [][]byte
find byte
obstacle byte
found bool
}
func newDfs(grid [][]byte, find byte, obstacle byte) *Dfs {