-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootanim_trim.cpp
More file actions
42 lines (37 loc) · 848 Bytes
/
Copy pathbootanim_trim.cpp
File metadata and controls
42 lines (37 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*bootanim trim.txt script*/
#include <iostream>
#include <math.h>
using namespace std;
int div (int res) {
int divided;
divided=res/2;
return divided;
}
int min (int resm, int picm){
int midle;
midle=resm-picm;
return midle;
}
int main () {
int x, y, W, H, Wm, Hm, w1m, h1m, position1, position2;
cout << "Enter your Screen Resolution\n";
cout << "Width: ";
cin >> W;
cout << "Height: ";
cin >> H;
Wm=div(W);
Hm=div(H);
cout << "Enter your image resolution\n";
cout << "Width: ";
cin >> w1m;
cout << "Height: ";
cin >> h1m;
x=div(w1m);
y=div(h1m);
position1=min(Wm,x);
position2=min(Hm,y);
cout << "Here is your value\n";
cout << "format in (WxH+x+y)\n";
cout << w1m << "x" << h1m << "+" << position1 << "+" << position2;
return 0;
}