fork download
  1. #include <cctype>
  2. #include <iomanip>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. struct COS
  7. {
  8. unsigned RadioCD:1;
  9. unsigned Fotelik:1;
  10. unsigned Ubezpieczenie:1;
  11. };
  12.  
  13. int main()
  14. {
  15. COS x;
  16. x.RadioCD=toupper((cin>>ws).get())=='T';
  17. x.Fotelik=toupper((cin>>ws).get())=='T';
  18. x.Ubezpieczenie=toupper((cin>>ws).get())=='T';
  19. cout<<x.RadioCD<<','<<x.Fotelik<<','<<x.Ubezpieczenie<<endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 3300KB
stdin
T
N
T
stdout
1,0,1