Answer:
=SUM(Range value)
like =SUM(A1:A7) or =SUM(A1:H1)
Explanation:
We need to make use of the SUM function, and then we need to mention the cells or range value that references a series of cells row-wise or column-wise. Like a range value of A1:A7 means A1,A2,A3,A4,A5,A6,A7 and the range value of A1:H1 means A1, B1,C1,D1,E1,F1,G1,H1. And similarly, you can represent various cells depending upon the code you come up it, and finally, you need to sum them all using the SUM function.
Answer:
Following are the program in python language
def prob3_6(k): #function definition
c = 0 #variable declaration
while k != 1: #iterating the while loop
print(k) #print k
if k % 2 == 0:#check if condition
k= k // 2 #divisible by 2
else: #else condition
k = k * 3 + 1
c = c + 1
print(k) #print k
print c #print count
prob3_6(3)#function call
Output:
3
10
5
16
8
4
2
1
7
Explanation:
Following are the description of program
- Create a function "prob3_6" in this function we passing an integer parameter of type "int" named "k".
- Inside that function we declared a variable "c" of type "int" that is used for counting purpose .
- After that we iterated the while for print the value of when it is not equal to 1 .
- We check if condition when k gives 0 on modulus then k is divisible by 2 otherwise else block will be executed in the else part we multiply by 3 to k and add 1 to the k variable .
- Finally print "k" and "c"
Answer:
<em>C++</em>
////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
int n = 1;
while (n != 0) {
cout<<"Enter an integer, the input ends if it is 0: ";
cin>>n;
v.push_back(n);
}
cout<<endl;
///////////////////////////////////////////////////////////
int sum = 0;
int num_positives = 0, num_negatives = 0;
for (int i=0; i<v.size()-1; i++) {
if (v[i] > 0)
++num_positives;
else
++num_negatives;
sum = sum + v[i];
}
//////////////////////////////////////////////////////////
cout<<"The number of positives is "<<num_positives<<endl;
cout<<"The number of negatives is "<<num_negatives<<endl;
cout<<"The total is "<<sum<<endl;
cout<<"The average is "<<(float)sum/(v.size()-1);
///////////////////////////////////////////////////////////
return 0;
}
Try clicking the down arrow on the search bar or right clicking it and selecting an option no if that doesn’t work then drag the || to somewhere or right click it. If none of those work you can right click the taskbar and see if there is anything that looks like it could be the search bear and uncheck it
False i doesnt shows anything like this