Skip to content

Instantly share code, notes, and snippets.

View 0x73hahd's full-sized avatar
Inactive for some time due to unfortunate reasons

Shahd Mostafa Riyad 0x73hahd

Inactive for some time due to unfortunate reasons
View GitHub Profile
@0x73hahd
0x73hahd / Calculator.java
Created December 14, 2022 03:48
A simple calculator for a first-grade college project
import java.util.Arrays;
import java.util.Scanner;
public class Calculator {
static Scanner sc = new Scanner(System.in);
static double[] after_power = {};
static char answer = 'n';
public static void main(String[] args) {
switch (choose_operation()) {
case '+':

لغة الـسي بلس بلس strongly-typed language، يعني كل variable هـنعملو declaration لازم نحدد الـ data type بتعتو الأول، دا عشان نعرف الـ compiler بالحجم اللي هيحجزو ف الـ memory للـ variable، الحجم هيكون حسب الـ data type لأن كل data type بتاخد مساحة معينة فـ الـ memory، الـ data types فـ الـ ++C ليها أنواع اساسية(Primary)، مشتقة(Derived) و أنواع أحنا بنعملها(User Defined).

C_C++_Data_Types


@0x73hahd
0x73hahd / inverted-half-pyramid-of-numbers.rs
Created January 24, 2023 04:30
Inverted half pyramid of numbers in rust
use std::io;
fn main(){
let mut rows = String::new();
io::stdin()
.read_line(&mut rows)
.expect("failed to readline");
let row = rows.trim().parse::<i64>().unwrap();