Programlama | Programlama Dilleri | C Programlama Dili |C++

Hata
  • XML Parsing Error at 1:82. Error 9: Invalid character


Switch-Case Örne?i

AÇIKLAMA

Bu program örnek bir switch-case uygulamas?d?r. Programda kullan?c?dan al?nan not giri?ine uygun olarak bir mesaj penceresi gösterilmektedir.

Program?n Tamam?n? A?a??daki Linkten ?ndirebilirsiniz

Linki Görebilmeniz ?çin Üye Olman?z Gerekmektedir...

Üye Kay?t

Program Kodu:

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "Unit1.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.         : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TForm1::Button1Click(TObject *Sender)
  16. {
  17. int a=StrToInt(InputBox("NOT G?R???","Notunuzu Giriniz",""));
  18. switch (a)
  19. {
  20. case 0: Application->MessageBox("Çok Berbats?n!","SONUÇ",MB_ICONINFORMATION)break;
  21. case 20: Application->MessageBox("Kötüsün!","SONUÇ",MB_ICONINFORMATION);     break;
  22. case 40: Application->MessageBox("?yi De?ilsin!","SONUÇ",MB_ICONINFORMATION)break;
  23. case 49: Application->MessageBox("S?n?rdas?n!","SONUÇ",MB_ICONINFORMATION)break;
  24. case 50: Application->MessageBox("?dare Eder!","SONUÇ",MB_ICONINFORMATION); break;
  25. case 60: Application->MessageBox("Fena Say?lmazs?n!","SONUÇ",MB_ICONINFORMATION); break;
  26. case 75: Application->MessageBox("?yisin!","SONUÇ",MB_ICONINFORMATION);    break;
  27. case 100: Application->MessageBox("Çok ?yi!","SONUÇ",MB_ICONINFORMATION);   break;
  28. default: Application->MessageBox("Tan?ml? Bir Not Giri?i De?il!","SONUÇ",MB_ICONINFORMATION); break;
  29. }
  30. }
  31. //---------------------------------------------------------------------------
  32.  

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Perşembe, 07 Nisan 2011 23:16 )  
404 Not Found

404

Not Found

The resource requested could not be found on this server!


Proudly powered by LiteSpeed Web Server

Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.