Advertisement
Sierra_ONE

Job Opportunity: Positions

Oct 8th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.78 KB | Source Code | 0 0
  1. /*
  2. 7. Job Opportunity: Positions
  3. Hello there, it says here that you are trying to apply for an HR position in our company. We have a little test to know if you are capable of the job. I'm going to give you the numbers of a 5-man team and you're going clarify each of their positions by separating them from one another. Good luck!
  4.  
  5. Inputs
  6. 1. The 5-man team's numbers
  7. */
  8.  
  9.  
  10. #include <stdio.h>
  11.  
  12. int main(){
  13.    
  14.     int num,s1,s2,s3,s4,s5;
  15.    
  16.     printf("Enter the 5-man team's numbers: ");
  17.     scanf("%d",&num);
  18.    
  19.     s1 = num % 10;
  20.     num = num / 10;
  21.     s2 = num % 10;
  22.     num = num / 10;
  23.     s3 = num % 10;
  24.     num = num / 10;
  25.     s4 = num % 10;
  26.     num = num / 10;
  27.     s5 = num % 10;
  28.    
  29.     printf("%d ",s5);
  30.     printf("%d ",s4);
  31.     printf("%d ",s3);
  32.     printf("%d ",s2);
  33.     printf("%d ",s1);
  34.  
  35.  
  36.  
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement