Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i,j;
  6. cin>>n;
  7. int a[n][n];
  8. for(i=0;i<n;i++)
  9. {
  10. for(j=0;j<n;j++)
  11. {
  12. char m;
  13. cin>>m;
  14. if(int(m)<=65&&int(m)<=90)
  15. {
  16.  
  17. int x=int(m)-64;
  18. a[i][j]=x;
  19. cout<<a[i][j]<<endl;
  20.  
  21. }
  22. else
  23. {
  24. int x=95-int(m);
  25. a[i][j]=~x;
  26. cout<<a[i][j]<<endl;
  27. }
  28.  
  29.  
  30.  
  31. }
  32. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement