ตัวอย่างการใช้สิทธิ 45 C
ชื่อเรื่อง: การเรียนรู้ที่จะใช้ลงทะเบียนในการกำหนดตัวแปร
การวิเคราะห์โครงการ: ไม่มี
รหัสที่มา:
// Created by www.w3big.com on 15/11/9. // Copyright © 2015年 本教程. All rights reserved. // #include <stdio.h> int main() { register int i; int tmp=0; for(i=1;i<=100;i++) tmp+=i; printf("总和为 %d\n",tmp); return 0; }
เอาท์พุทตัวอย่างข้างต้นคือ
总和为 5050