Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int cumpleTamano(Fotografia foto){
- int h=0, w=0, i, m=0, total, k=0;
- for(i=0; foto.tamano[i] != 'x'; i++){
- }
- for(int j=(i-1); j>=0; j--){
- h = h + (foto.tamano[j] -'0')*pow(10, m);
- m++;
- }
- for(m=(strlen(foto.tamano) - 1); m>i; m--){
- w = w + (foto.tamano[m] - '0')*pow(10, k);
- k++;
- }
- total = w*h;
- if(MAX_MEGA_PIXELS*1000000 >= total){
- return 0;
- }else{
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement