Answer:
- def calcSum(d):
- sum = 0
- for x in d:
- sum += int(x)
- return sum
-
- digits = input("Please enter your digits: ")
- print(calcSum(digits))
Explanation:
The solution code is written in Python.
Firstly, create a function that take one input digit string (Line 1).
In the function, create a sum variable with initial value 0.
Use a for loop to traverse through each character in the digit string and in the loop use int method to convert each character to integer and add it to sum variable (Line 3-5) and return the sum as output.
Next, use input function to prompt user enter a digit string (Line 7).
Lastly test the function by passing the input digit as argument and print the result (Line 8).
Answer:
#include <iostream>
using namespace std;
int main()
{
int i = 45;
for ( i = 45; i <=165; i = i + 6)
cout << i << endl;
}
Explanation:
I corrected your code and highlighted the mistakes. Even though you wrote the correct algorithm, your code did not compile because of the typos you made.
Remember, C++ is a case-sensitive language. That means, "For" is not same as "for".
Generally, variables and keywords are written in lower case. Of course, there are exceptions, such as constant variables are all written in uppercase letter and class names start with an uppercase letter.
Answer:
yo! but I'm a ex-mobile legends
Answer: Option (a) ,(c) and (e) can become a solution for the problem.
Option(b) and (d) are not exactly a solution to the issue rather can be considered on temporary basis
Explanation: Windows Task Manager is used for processing task taking place in the system and monitors the performance of that task or program that is running.To stop the unnecessary program execution on the system. methods like searching the source of the program from Task scheduler, startup files or registry key that initiated the execution that unwanted task.
Methods like disabling the program by using Msconfig and Task manager will only deactivate them but they are not eliminated from the source .Thus the appropriate answers would be option(a), (c) and (e).
I don't know technology, but using Satellite images, we are able to see that the continents once fitted into one 'jigsaw'. This shows that the continents must have drifted to its original place. Furthermore, Geothermal stations have pointed out convection currents in the Earth's mantle has caused the movement of crusts.