The line code will create array is G = array('f',[2.5, 3, 7.4])
<h3>What is meant by array ?</h3>
As opposed to defining distinct variables for each value, arrays are used to hold numerous values in a single variable. Set the data type (such as int) and the array name, followed by square brackets [, to construct an array.
An array is a collection of elements with the same type that are kept in nearby memory locations and may each be separately referred to using an index to a special identifier. There is no need to declare five distinct variables when declaring an array of five int values (each with its own identifier).
In the C programming language, arrays are a derived data type that may contain primitive data types like int, char, double, float, etc.
To learn more about array refer to :
brainly.com/question/28061186
#SPJ1
Answer:
17%
Explanation:
Given parameters:
Cost price of liquor = $4000
Total sale = $24000
Unknown:
Percentage cost of sale for liquor = ?
Solution:
To find the percentage cost of sale;
%Cost of sale of liquor =
x 100
Input the variables;
%Cost of sale of liquor =
x 100 = 16.67% = 17%
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:
Following are the solution to this question:
Explanation:
Please find the complete question in the attached file.
It will obtain as much information about this matter as necessary even before the conference. It includes its gravity or probability of risk, various cases in the entire event, the possible solutions to the issues, as well as the consequences for parties involved in each potential answer, and Only at conferences, it may clarify to my boss that the explanation for the problem and also in details. It will be doing everything possible and try not to conceal the details but highlight the problem.