C++ Yazılı Puanını Nota Çeviren Örnek

R

Rooster

only business
Super Moderator
Joined
Aug 10, 2019
Messages
3,215
Reaction score
4,728
Location
Milano
Bu örneğimizde kullanıcının girmiş olduğu 0-100 arası puan değerini nota çeviren C++ kodlarını göreceğiz. if -Else if yapısı içinde kullanarak girilen puanı nota çevireceğiz.


Örneğimizde uygulayacağımız puan not sistemi şu şekilde olacaktır.

0-50 : 1
50-60 : 2
60-70 : 3
70-85 : 4
85-100 : 5
Diğer durumlarda Geçersiz Giriş uyarısı.

Şimdi C++ kodlarımızı yazalım.

Code:
#include <iostream>
using namespace std;
//ealitycheats.com
int main()
{
   setlocale(LC_ALL,"Turkish"); //Türkçe karakter
   int puan;
   cout<<"Puanı Girin : ";
   cin>>puan;
   if(puan>100)
   {
       cout<<"Geçersiz.";
   }
   else if(puan>84)
   {
       cout<<"5";
   }
    else if(puan>69)
   {
       cout<<"4";//realitycheats.com
   }
    else if(puan>59)
   {
       cout<<"3";
   }
    else if(puan>49)
   {
       cout<<"2";
   }
    else if(puan>=0)
   {
       cout<<"1";
   }
   else
   {
       cout<<"Geçersiz.";//realitycheats.com
   }
}
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom