Answer:
What they're saying is that the first two bytes (first two eight bit segments) tell you the width and height of the pattern.
In the example given, you'll notice that the first 16 digits are 00000100 00000100. If you convert those to decimal, you'll see that those are both equal to four.
If instead the second block of eight bits was 00000111, the image height would then be seven.
What is the total March Expenditure now? (cell Q2)
#include
main()
{
int i, n=10, rem, inc=0;
scanf("%d",&n);
for(i=1; i =3)
inc++;
else;
inc--;
}
printf("Final Value=\n",inc);
}
SOLVE THIS PROGRAM...
Answer:inpossible !889
Explanation: I npossible !889
write an algorithm and draw a flowchart to calculate the sum of of the first 10 natural numbers starting from 1
Answer:
#include <stdio.h>
void main()
{
int j, sum = 0;
printf("The first 10 natural number is :\n");
for (j = 1; j <= 10; j++)
{
sum = sum + j;
printf("%d ",j);
}
printf("\nThe Sum is : %d\n", sum);
}
Within a loop
Step 1: Initialize a variable to 1 (say x=1)
Step 2: Specifiy the condition
In this case x<=10
Step 3: Increment the variable by 1
using increment operator x++
OR
simply x+=1(x=x+1)
Step 4: Print the value of variable
Terminate the loop
Explanation: