- LAB 2 :
- Q2: Theatre Square .
- #include <iostream>
- using namespace std;
- int main() {
- long n,m,a,v,c;
- cin>>n>>m>>a;
- if (n%a ==0)
- v=n/a;
- else v=n/a +1;
- if (m%a==0)
- c=m/a;
- else c=m/a +1;
- cout << v*c;
- return 0;
- }
- -----------------------------------------------------------------------------------------
- Q3:
- Ciel and A-B Problem
- #include <iostream>
- using namespace std;
- int main() {
- int a,b,c;
- cin>>a>>b;
- if((a-b)%10 ==9)
- c=a-b-1;
- else if ((a-b)%10==0)
- c=a-b+3;
- else c=a-b+1;
- cout <<c;
- return 0;
- }
- -----------------------------------------------------------------------------------------
- JEBRIL MEJDALAWI <3 JCE