-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathADAKNG.cpp
More file actions
61 lines (59 loc) · 911 Bytes
/
ADAKNG.cpp
File metadata and controls
61 lines (59 loc) · 911 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int isalpha(int *str, int n)
{
int sum = 0;
for(int i = 0; i < n-1; i++)
{
sum += (str[i+1] - str[i]-1);
}
return sum;
}
ll sumOFDigit(ll n)
{
ll sum = 0;
while(n > 0)
{
sum += num%10;
n /= 10;
}
return sum;
}
int main(){
int test;
cin >> test;
while(test--)
{
int n;
int row = n/8;
int col = n%8;
int i,j;
for(i = 0;i < row; i++)
{
for( k = 0; k< 8; k++)
{
cout <<"." << " ";
}
cout << endl;
}
for( j = 0; j < col; j++)
cout << "." << " ";
for(int k = j; k < 8; k++)
cout << "X" << " ";
cout << endl;
if(i <=7)
{
for(int k = 0; k< 8; k++)
cout << "#" << " ";
cout << endl;
i++;
}
for(int k = i; k< 8; k++){
for(int j = 0; j< 8; j++ )
cout << "."<< " ";
cout << endl;
}
}
return 0;
}