Advertisement
Guest User

nil

a guest
Jan 23rd, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. int cumpleTamano(Fotografia foto){
  2. int h=0, w=0, i, m=0, total, k=0;
  3.  
  4. for(i=0; foto.tamano[i] != 'x'; i++){
  5.  
  6. }
  7. for(int j=(i-1); j>=0; j--){
  8. h = h + (foto.tamano[j] -'0')*pow(10, m);
  9. m++;
  10.  
  11. }
  12.  
  13. for(m=(strlen(foto.tamano) - 1); m>i; m--){
  14. w = w + (foto.tamano[m] - '0')*pow(10, k);
  15. k++;
  16. }
  17.  
  18. total = w*h;
  19. if(MAX_MEGA_PIXELS*1000000 >= total){
  20. return 0;
  21. }else{
  22. return 1;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement