บทความ

exercise1-อาจารย์ชนินทร์

https://drive.google.com/file/d/0B0H3iTNN1HduU2IxSmItVkRWLWM/view?usp=sharing

กำลังการผลิตเหล็กเส้นประจำปี2560

รูปภาพ
https://drive.google.com/file/d/0B0H3iTNN1HduN1c1M3EyNUpuV0U/view?usp=sharing

factorial

รูปภาพ
x=input("input..."); fact=1 for k=1:x fact = k*fact end printf("\noutput..%d!=%d\n",x,fact)

if/else 2

รูปภาพ
x=input("input..."); if(x>0) s='positive' elseif(x<0) s='negative' else s='zero' end printf("\noutput..%s\n",s)

Zero if/else

รูปภาพ
function s=signum(x) if(x>0) s='positive' elseif(x<0) s='negative' else s='zero' end endfunction

My salary3

รูปภาพ
//Future Value of money/Compound interest clear n=input("ระยะเวลา(ปี)....."); p=input("ยอดฝากรายเดือน......."); i=input("ดอกเบี้ยต่อปี......."); for j=1:n f(j)=(p*12)*(1+(i/100))^j; j=j+1; end printf("\nเงินที่ได้รับในปีที่..%dเท่ากับ...%3f\n",n,f(j=n))