- 
                Notifications
    
You must be signed in to change notification settings  - Fork 163
 
feat (verify.cpp): exercise done #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
           il workflow codestyle fallisce, vedi perchè  | 
    
        
          
                exercises/verify.cpp
              
                Outdated
          
        
      | for(int i = 0; i < DIM; i++){ | ||
| if(x == N[i]) | ||
| return true; | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| for(int i = 0; i < DIM; i++){ | |
| if(x == N[i]) | |
| return true; | |
| } | |
| for (int i = 0; i < DIM; i++) { | |
| if (x == N[i]) | |
| return true; | |
| } | 
Nonscriveremaituttoattaccato, usa degli spazi quando scrivi codice, aumenterai la leggibilità
        
          
                exercises/verify.cpp
              
                Outdated
          
        
      | if(found) | ||
| cout << "The number " << x << " is present in the array" << endl; | ||
| else | ||
| cout << "The number " << x << " is not present in the array" << endl; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potresti usare un operatore ternario quando il risultato di una stampa dipende da una variabile che modifica solamente una parola (not) o in quantità minima.
| if(found) | |
| cout << "The number " << x << " is present in the array" << endl; | |
| else | |
| cout << "The number " << x << " is not present in the array" << endl; | |
| cout << "The number " << x << " is" << (found ? "" : " not") << " present in the array" << endl; | 
No description provided.