Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// recursive function to find sum from 1 to n
int recur_Sum(int n)
{ // base condition
if (n <= 1)
return n;
// recursive call
return n + recur_Sum(n - 1);
}
// main function
int main()
{
// variables
int n;
cout<<"Enter a number:";
// read the number
cin>>n;
// print the sum
cout<<"Sum of first "<<n<<" integer from 1 to "<<n<<" is:"<<recur_Sum(n);
return 0;
}
Explanation:
Read a number from user and assign it to variable "n".Call function recur_Sum() with parameter "n".This function will recursively call itself and find the Sum of first n numbers from 1 to n.Then function will return the sum.
Output:
Enter a number:10
Sum of first 10 integer from 1 to 10 is:55
Answer:
2.5 = float
'2.5' = str
3 = int
Explanation:
The data type: "float" is used for positive or negative decimals.
The data type: "str" is used for a sequence of letters, numbers, or symbols. Since the decimal used apostrophes, this means it's a character literal.
The data type: "int" is used for any positive or negative whole number.
The <span>key that will cause the windows boot manager to appear as long as it is pressed during the windows startup process is the S</span>pacebar. T<span>he </span>spacebar<span> or </span>space bar<span> is a long horizontal key on the lower edge of a keyboard that is always the largest and longest key on the keyboard.</span>
Answer:
Explanation:if a open world game / rpg had humanoids that had lore behind them then the player will feel guilt about killing them from allah
When you get off of school while it is fresh in your mind and in a quiet place where you can stay on task without distractions.