Use the following rules:
- The sum of currents that enter and exit a node (junction) is always zero. So if you have 3 wires that connect, through one flows 2A, the other 3A, then the third must deliver 5A (taking the direction into account!)
- The sum of voltages across different components should always add up. So if you have a battery of 10V with two unknown resistors, and over one of the resistors is 4V, you know the other one has the remaining 6V.
- With resistors, V=I*R must hold.
With these basic rules you should get a long way!
Here is a somewhat cryptic solution that works:
#include <algorithm>
#include <cstdlib>
using namespace std;
void q(char c, int count)
{
for (int i = 0; i < count; i++) {
putchar(c);
}
}
void p(int b1, int plusses)
{
q(' ', b1);
q('+', plusses);
}
int main()
{
for (int i = -3; i <= 3; i++)
{
int pl = min(6, (3 - abs(i)) * 2 + 1);
p(6-pl, pl);
i == 0 ? p(0, 6) : p(6, 0);
p(0, pl);
putchar('\n');
}
getchar();
}
Answer:
1111000
Explanation:
perform the following. write from right to left:
- is the number even? then write down a 0
- is the number odd? then write down a 1 and subtract 1
- divide by 2
- repeat until you reach 0.
So for 120:
120 is even, so write down a 0 and continue with 120/2=60
60 is even, so write down a 0 and continue with 60/2=30
30 is even, so write down a 0 and continue with 30/2=15
15 is odd, so write down a 1 and continue with 14/2=7
7 is odd, so write down a 1 and continue with 6/2=3
3 is odd, so write down a 1 and continue with 2/2=1
1 is odd, so write down a 1 and finish with 0
You should have the percentage of tip based on the service that you received.
Then you multiply the percentage of tip by the amount of money that you have to pay for what you bought.
Answer:
Adobe Indesign.
Explanation:
Adobe indesign is a typesetting and desktop publishing application used to create posters, newspapers, flyers, brochures, magazines, presentations, book and ebook etc.
It is a package from the Creative cloud adobe system packages. It has predetermined templates for newspaper pages (if newpaper is to published), and plug-ins to further customize the the layout of the newspaper to be created or published.