Odpowiedź:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int pkt;
cin>>pkt;
switch(pkt)
case 0 ... 10: cout<<2;break;
case 11 ... 13: cout<<3;break;
case 14 ... 16: cout<<4;break;
case 17 ... 18: cout<<5;break;
default:cout<<"Bledne dane";
}
return 0;
Wyjaśnienie:
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
Odpowiedź:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int pkt;
cin>>pkt;
switch(pkt)
{
case 0 ... 10: cout<<2;break;
case 11 ... 13: cout<<3;break;
case 14 ... 16: cout<<4;break;
case 17 ... 18: cout<<5;break;
default:cout<<"Bledne dane";
}
return 0;
}
Wyjaśnienie: