คือผมไม่ใช่โปรแกรมเมอร์คับ (อยากเป็น 55+) ผมเรียนอยู่อเมริกาคับ ยุว grade11 (งงมั๊ย55)
 แล้วผมเกิดสนใจ ภาษา C++ เลยลองเรียนเองตามเน็ต... เรียนได้ 3วันพอจะรู้แค่
 1. cout/cin
 2. loop
 3. if
 4. switch
 ๆลๆ
 แล้วพอรู้มาหน่อยนึงก้เกิดอยากลองทำโปรแกรม ดู... ลองผิดลองถูกพักนึงก้ได้โค๊ดตามนี้คับ...
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
#include <iostream>
 using namespace std;
 int main()
 {
     cout << "Loading... 100%" << endl;
     cout << "Loading Complete..\n" << endl;
     
     int x;
     int y;
     int total;
     int choice;
     
     cout << "Give me a number .." << endl;
     cin >> x;
     
     cout << "Give me another one .. \n";
     cin >> y;
     
     cout << "Choose what to do .. \n";
     cout << "Type 1 for Plus .. \n";
     cout << "Type 2 for Minus .. \n";
     cout << "Type 3 for multiply .. \n";
     cout << "Type 4 for Divide .. \n";
     cin >> choice;
     
     switch (choice){
         case 1:
             total = x + y;
             cout << total << " is the answer..";
             break;
         case 2:
             total = x - y;
             cout << total << " is the answer..";
             break;
         case 3:
             total = x * y;
             cout << total << " is the answer..";
             break;
         case 4:
             total = x / y;
             cout << total << " is the answer.." << endl;
             break;
         }
     cout << endl << ".\n.\n";
     
     int choice2;
     
     cout << endl << "Do you want to Restart this Program?" << endl;
     cout << "Type 1 for Yes" << endl << "Type 2 for No" << endl;
     cin >> choice2;
     
     switch (choice2){
         case 1:
             do{
                 cout << endl << "Give me a number .." << endl;
         cin >> x;
     
         cout << "Give me another one .. \n";
         cin >> y;
     
         cout << "Choose what to do .. \n";
         cout << "Type 1 for Plus .. \n";
         cout << "Type 2 for Minus .. \n";
         cout << "Type 3 for multiply .. \n";
         cout << "Type 4 for Divide .. \n";
         cin >> choice;
     
         switch (choice){
             case 1:
                 total = x + y;
                 cout << total << " is the answer..";
                 break;
             case 2:
                 total = x - y;
                 cout << total << " is the answer..";
                 break;
             case 3:
                 total = x * y;
                 cout << total << " is the answer..";
                 break;
             case 4:
                 total = x / y;
                 cout << total << " is the answer.." << endl;
                 break;
             }
             
             int choice3;
             
             cout << endl << "Do you want to Restart this Program?" << endl;
             cout << "Type 1 for Yes" << endl << "Type 2 for No" << endl;
             
             cin >> choice3;
             
                 switch (choice3){
                     case 1:
                         cout << "System Restarting..." << endl;
                         cout << "Finished .. /n/n";
                     case 2:
                         cout << "ThankYou for using my program .. ^^";
                         cout << endl << "Owner >> Sheikh Norsam Saturgo" << endl;
                         cout << "Made by >> Sheikh Norsam Saturgo" << endl;
                         return 0;
                 }
                     
         }while (1<2);
         
         break;
         
         case 2:;
             cout << "ThankYou for using my program .. ^^" << endl;
         break;
     default:
         cout << "System Error Please Try Again ... ^^" << endl;
 }
     return 0;
 }
 ที่อยากรู้คือว่า มันใช่ได้ไหม? แค่นี้แหละ 555555																																	
  
							 
						
C++ เครื่องคิดเลข ของผม ช่วยดูหน่อย...
แล้วผมเกิดสนใจ ภาษา C++ เลยลองเรียนเองตามเน็ต... เรียนได้ 3วันพอจะรู้แค่
1. cout/cin
2. loop
3. if
4. switch
ๆลๆ
แล้วพอรู้มาหน่อยนึงก้เกิดอยากลองทำโปรแกรม ดู... ลองผิดลองถูกพักนึงก้ได้โค๊ดตามนี้คับ...
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้
ที่อยากรู้คือว่า มันใช่ได้ไหม? แค่นี้แหละ 555555