Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7.     int a, i, n, b, c, d;
  8.    
  9.     n = 2;
  10.     c = 0;
  11.    
  12.     for ( i = 1; i = 11; i++)
  13.         {
  14.         cin >> a;
  15.         b = 0;
  16.        
  17.         if (a > 3)
  18.             {
  19.             while (2 * n <= a)
  20.                 {
  21.                 if (a % n == 0)
  22.                     b++;
  23.                 n++;
  24.                 }
  25.             }
  26.         else
  27.             {
  28.                 switch (a)
  29.                 {
  30.                     case 1:
  31.                         {
  32.                             b = 1;
  33.                         }
  34.                     case 2:
  35.                         {
  36.                             b = 2;
  37.                         }
  38.                     case 3:
  39.                         {
  40.                             b = 2;
  41.                         }
  42.                 }
  43.             }
  44.         c = c + b;
  45.         }
  46.     d = c % 10;
  47.    
  48.     cout << d;
  49.    
  50.     return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement