Answer:
//variable integer_list to hold a list of integers
DECLARE integer_list
ASSIGN values to integer_list
//variable sum to hold the sum of the elements in the list
DECLARE sum
ASSIGN zero to sum
//loop through the integer_list and sum all it's elements together.
for(int i=0; i<integer_list.size(); i++){
sum += interger_list.get(i)
}
//Show the result of the addition from the for loop
DISPLAY "The sum is " + sum
Explanation:
The above code uses some hypothetical programming language syntax. The second and third lines declare an arbitrary integer list and assign a set of values to it respectively.
The fifth line declares a variable "sum" which will hold the result of summing all the elements in the list. The sixth line initializes "sum" to zero.
The for loop shown iterates through the integer list cumulatively summing its elements.
The result is displayed as written on line 12.
Hope it helps!
This is in fact false to my knowledge
Most teachers prefer you to use Arial or Times New Roman
Answer:
#include <stdio.h> // header file inclusion
int main() // main function declaration
{
int number,product=0; // variable declaration
while(product<100) // while loop
{
scanf("%d",&number); // input a number
product= number*10; // multiply the number by product
printf("%d\n",product); // print the value of product
}
return 0; // return statement
}
Output:
- If the user enter 10 then the loop terminates for the first time and the output is 100.
- If the user enter 5,10 then the loop executes in 2 times and the output is 50 and 100.
Explanation:
- Firstly there is an inclusion of header file which understands the meaning of printf() and scanf() function.
- Then there is the main() function definition
- Then we declare a two-variable (number and product) of integer type.
- Then we define a while loop and check the condition that product value is less than 100 or not.
- Then we take input and multiply by 10.
- Then we assign the value in the product and print the product value.
Answer:
A) Overexposure of candidates B) Misinformation C) Partisan dialogue
Explanation:
Nowadays the internet is growing exponentially which results in both the advantages and disadvantages of it. social media has become a central platform to communicate with other people.
From the perspective of political life, there are many drawbacks of the internet, some of them are,
When rumors of any candidate spread over the internet, it results in the overexposure of candidates which is not a good sign in political life.
Another problem is misinformation as people spread only half the information which they come to know from other people but not the full information which results in misinformation.
partisan dialogue is also one of the main drawbacks of the internet in political life.
So the most appropriate answer is option A, B, and C.