Answer:
The solution in C++ is:
#include <iostream>
using namespace std;
int main(){
int N, A;
cout<<"Grids: "; cin>>N;
cout<<"White: "; cin>>A;
cout<<"Black: "<<N * N - A;
return 0;
}
Explanation:
This declares N and A, as integers
int N, A;
This gets inputs for N
cout<<"Grids: "; cin>>N;
This gets inputs for A, (the white grids)
cout<<"White: "; cin>>A;
This calculates and prints the number of black grids
cout<<"Black: "<<N * N - A;
PS
From the question, we understand that the grid is N by N square grids.
This means that:
[tex]Total = N * N[/tex]
So, the number of black grids is:
[tex]Black = Total - A[/tex]
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….
a. Margin
b. View
c. LayOut
d. Paragraph
Office 92 sering disebut juga dengan….
a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah
B.View
Office 92 sering disebut juga dengan
A.Office 3.0
What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it
Answer:
Restart
Explanation:
Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.
explain the working principle of computer? can anyone tell
Answer:
input process and output hehe
Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:
user_in = input ("Please enter your username: " )
if user_in in "0123456789":
print ("Username cannot contain numbers")
elif user_in in "?":
print ("Username cannot continue special character")
else:
print (" Welcome to your ghetto, {0}! ".format(user_in))