Explanation:
#include <iostream.h>
#inlcude<conion.h>
void main()
{
int count, x;
clrscr();
cout<<"Enter the count:";
cin>> count;
cout<<"Ready!\n";
for(x=count;x>0;x--)
{
cout<<x<<"\n";
}
cout<<"Start";
getche();
}
This is a simple program where the output is expected to be in reverse order. So we run a for loop starting from the count and decrements the counter by 1 every time when the loop runs and print the value. So to print the output in "new line" we include "\n".
Here is a Python program:
tmp = input().split(' ')
c = tmp[0]; s = tmp[1]
ans=0
for i in range(len(s)):
if s[i] == c: ans+=1
# the ans variable stores the number of occurrences
print(ans)
One approach to solving this is to first calculate the current the will flow through all three resistors:
The total resistance is R1+R2+R3 = 5280
I = V/R = 30/5280 ≈ 5,682 mA
Then the drop across R2 = I*R2 = 5,7mA * 1000 ≈ 5.682 V.
So this is based on the fact that V=I*R and there is one current running in the entire chain, ie., it is the same through each resistor.
Business intelligence can be used by managers in order to see how well their departments are. Now go and get that A+