Answer:
because you are asking questions like this
Explanation:
when you ask questions you lose points
Answer:
Remote Backup means the backup of your data that is stored at some online storage place or server.
Explanation:
Remote is the terminology that is used for distance things that are not directly accessible but can be accessed through some online medium.
Backup means copy your data or information that is stored some where other than your PC.
So Remote Backup is a type of server that is used to store data on some online storage or server. Some times this server is called cloud.
<u>For Example</u>
Dropbox and Google drive are the examples of the remote server, These two storage are used to backup our data online. We can store and access data through these drives by on online server or storage by just having an internet connection.
Question:
Write a function that adds together all values from 0 to a given value and returns the final number. For example, if the given value is `4`, you would add 0 + 1 + 2 + 3 + 4
Answer:
In Python:
def add_to_value(n):
sum = 0
for i in range(n+1):
sum = sum + i
return sum
Explanation:
This line defines the function
def add_to_value(n):
This line initializes sum to 0
sum = 0
The following iteration adds from 0 to n
<em> for i in range(n+1):</em>
<em> sum = sum + i</em>
This line returns the calculated sum
return sum
Line graphs are used to graph change in time
answer:
(i) #include <iostream>
using namespace std;
int main() {
int n1,n2,max;
cin>>n1>>n2;
if(n1>n2)//finding maximum between n1 and n2 in the program directly.
max=n1;
else
max=n2;
cout<<max;
return 0;
}
(ii)
#include <iostream>
using namespace std;
int maximum(int n1 ,int n2)
{
if(n1>n2)//finding maximum between n1 and n2 using function.
return n1;
else
return n2;
}
int main() {
int n1,n2,max;
cin>>n1>>n2;
max=maximum(n1,n2);
cout<<max;
return 0;
}
(iii)
#include <iostream>
using namespace std;
inline int maximum(int n1 ,int n2)
{
return (n1>n2)? n1:n2;
}
int main() {
int n1,n2,max;
cin>>n1>>n2;
max=maximum(n1,n2);//Finding maximum using inline function.
cout<<max;
return 0;
}
Output:-
54 78
78
all three codes give the same output.
Explanation:
In part (i) I have done the operation in the main function directly.
In part(ii) I have used function to calculate the maximum.
In part(iii) I have used inline function to calculate maximum.