Int findtotal(int a,int b){
if(b == 1)
return a;
if(a==b)
return 1;
int p = a-b;
return 1+ findtotal(max(p,b),min(p,b));
}
int main(){
int a=5;
int b=7;
int c=3;
int d=4;
cin>>a>>b>>c>>d;
int total =0;
//two for loops to get all possible sizes of box .then count
for(int i=a;i<=b;i++){
for( int j=c;j<=d;j++){
total+= findtotal(max(i,j),min(i,j););
}
}
cout<
Answers
Answered by
1
Here is your Answer mate ❤️
..
...
..
Similar questions
English,
4 months ago
Math,
4 months ago
Social Sciences,
9 months ago
Physics,
9 months ago
Physics,
1 year ago