Answer:
please mark as brainliest!!
Explanation:
public class SumOfDigits{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Please enter a number to calculate sum of digits"); int number = sc.nextInt(); // Remember number/10 reduces one digit from number // and number%10 gives you last digit int sum = 0; int input = number; while (input != 0) { int lastdigit = input % 10; sum += lastdigit; input /= 10; } System.out.printf("Sum of digits of number %d is %d", number, sum); // closing Scanner to prevent resource leak sc.close(); } }
Answer:
The solution code is written in Python.
- def mult2_diff(lst):
- num_list = []
-
- for x in lst:
- num_list.append(x * 2)
-
- diff = num_list[0]
- for i in range(1, len(num_list)):
- diff = diff - num_list[i]
-
- print(diff)
Explanation:
Firstly, based on the requirement stated in the question, define a function <em>mult2_diff() </em>that takes one argument, <em>lst</em>, which is a list of numbers (Line 1).
This function is expected to multiply each number in the list by two and then followed with computing the difference. To do so, let's try to attempt the first function task, multiplying numbers. Create a new list, num_list, to hold the multiplied numbers (Line 2). Use a for loop to traverse through each number in the input list, <em>lst</em>, and multiply each of them by two and add it to the <em>num_list </em>(Line 4-5).
To attempt the second function task, create another variable, <em>diff</em>, to hold the value of calculated difference between the numbers in the <em>num_list</em>. Initialize <em>diff </em>with the first number in the <em>num_list</em>. Use a another for-loop to traverse through each number in the num_list starting with second index, <em>1</em>, and calculate the difference between the <em>diff </em>and the current number extracted from the <em>num_list </em>through indexing.
At last print the output of <em>diff</em> (Line 11).
Answer: SFA(Sales force automation)
Explanation: SFA(Sales force automation) is the customer relationship management application for the establishing the relation with the customer point of view.
It is in the integrated form of application that works on the customer side along with the tools of the CRM. Sales force management system is also one of the name for the sales force automation.
Celebrating influences food in more than 1 way
<span>The character to the right of the cursor is deleted. </span>