ec1117

Programming Club Week 1

Sep 15th, 2021 (edited)
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. // Source: https://usaco.guide/general/io
  2.  
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main() {
  7.     int a, b, c;
  8.     string X;
  9.     cin >> X >> b;
  10.     cout << X << " sadfkjlk " <<  b << endl;
  11.  
  12.     if(b<10){
  13.         cout<<"This number is small";
  14.     } else {
  15.         cout<<"This number is big";
  16.     }
  17.  
  18.     if(X == "hey"){
  19.         cout<<"hi"<<endl;
  20.     }
  21.  
  22.     X="bye";
  23.     b=5;
  24.     cout << X << " sadfkjlk " <<  b << endl;
  25.  
  26.    
  27.     // bool d=true;
  28.     // if(d){
  29.     //  cout<<"d is true";
  30.     // }
  31.    
  32.     while(b<10){
  33.         b=b+1;
  34.         cout<<b<<endl;
  35.     }
  36.  
  37.     int x[10];//initializing an array
  38.    
  39.  
  40.     int index=1;
  41.     while(index<10){
  42.         x[index]=index;
  43.         cout<<x[index]<<endl;
  44.         index=index+1;
  45.     }
  46.  
  47.     x[5]=1;
  48.     cout<<x[5]<<endl;
  49. }
  50.  
Add Comment
Please, Sign In to add comment