لغة الـسي بلس بلس strongly-typed language، يعني كل variable هـنعملو declaration لازم نحدد الـ data type بتعتو الأول، دا عشان نعرف الـ compiler بالحجم اللي هيحجزو ف الـ memory للـ variable، الحجم هيكون حسب الـ data type لأن كل data type بتاخد مساحة معينة فـ الـ memory، الـ data types فـ الـ ++C ليها أنواع اساسية(Primary)، مشتقة(Derived) و أنواع أحنا بنعملها(User Defined).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 '+': |