Answer:
The program to calculate factor can be given as:
Program:
#include <stdio.h> //include header file
int main() //defining main function
{
int a,i; //defining integer variable
printf("Enter any number: "); //print message
scanf("%d",&a); //input value from user end
for(i=1;i<=a;i++) //loop for calculate factor values
{
if(a%i==0) //define condition for factor
{
printf("%d\n",i); //print values
}
}
return 0;
}
Output:
Enter any number: 15
1
3
5
15
Explanation:
In the above C language program the header file is include that provide the use of basic function, in the next line the main method is defined, inside this method two integer variable "a and i" is defined in which variable a is used to take value from user end and variable i is used in loop and conditional statement.
- In the next step, for loop is declare, that start from 1 and end with value of variable a, inside a loop, if block is used that checks (a%i==0), in this if variable i value modeler value equal to 0.
- The loop will use the print function that prints variable "i" element in a new line, which is the factor the values.
Answer:
For 32 bits Instruction Format:
OPCODE DR SR1 SR2 Unused bits
a) Minimum number of bits required to represent the OPCODE = 3 bits
There are 8 opcodes. Patterns required for these opcodes must be unique. For this purpose, take log base 2 of 8 and then ceil the result.
Ceil (log2 (8)) = 3
b) Minimum number of bits For Destination Register(DR) = 4 bits
There are 10 registers. For unique register values take log base 2 of 10 and then ceil the value. 4 bits are required for each register. Hence, DR, SR1 and SR2 all require 12 bits in all.
Ceil (log2 (10)) = 4
c) Maximum number of UNUSED bits in Instruction encoding = 17 bits
Total number of bits used = bits used for registers + bits used for OPCODE
= 12 + 3 = 15
Total number of bits for instruction format = 32
Maximum No. of Unused bits = 32 – 15 = 17 bits
OPCODE DR SR1 SR2 Unused bits
3 bits 4 bits 4 bits 4 bits 17 bits
Answer:
The correct answer to the following question will be "Semantic and Syntax error".
Explanation:
<u>Syntax error: </u>
Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.
<u>Semantic error: </u>
That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.
So, it's the right answer.
Answer:
Explanation:
Make sure resample is turned on
Turn on the chain link if you want the width and height to change together. If not, turn off the chain so that you can set your own width and height.
Choose your new size (you can choose to choose different measurement units by clicking on “inches”)
press ok
i hoped this helped!!!!!!!!
10.......................................