Viewers because your web page is meant for other people to get help or to do whatever on but Navigators, Programmers, and Target audience will most likely use resources from people they work with but viewers would most likely view your web page more than the others. Hope this helps mate <3
Answer:
#include<stdio.h>
int GetLargest()
{
int a[100],n,largest;
printf("Enter number of elements\n");
scanf("%d",&n);
printf("Enter elements\n");
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
i=0;
largest=a[i];
while(i<n)
{
i++
if(a[i]>largest)
largets=a[i];
}
return largest;
}
void main(){
int largest;
largest=GetLargest();
printf("Largest Number is %d",largest);
}
Explanation:
Here we define one function "GetLargest". This function reads n number of elements and finds the largest number among the n elements. Here we took one array and assumed first element is the largest element. if any element of the array is greater that that element we make that as larger and continues.at the end we are getting largest element in the n numbers and returning that to the main.
Answer:
It would be dangerous to give away any personal information on the internet because someone could attempt to find you, your family, your friends, your co-workers, etc. It is also important to use the internet responsibly because your future employers can track down your internet usage to see if you are worthy of the position they are offering. If those policies were broken at school you can not only get into trouble but damage your reputation to the school administrators who will be asked for recommendations for work opportunities in the future.
Answer:
this is no image for me to see to to do
Explanation:
Answer:
The solution code is written in C++:
- #include <iostream>
- using namespace std;
- int factorial(int n){
- if(n == 1){
- return n;
- }else{
- return n * factorial(n-1);
- }
- }
- int main()
- {
- int n;
- cout<<"Please enter a number <= 7 :";
- cin>>n;
-
- if(n <= 7){
- cout<<"Factorial is "<< factorial(n);
- }else{
- cout<<"Wrong input number.";
- }
- return 0;
- }
Explanation:
Firstly, create a function factorial with one input parameter (Line 1).
Next, create an if-else statement to check if input n is 1, just return the end (Line 6-7).
Otherwise, the function should return n multiplied by output of the recursive calling of the function itself (Line 8-9).
In the main program, create variable and prompt user to input number (Line 15 -17).
Next, do the input validation checking to ensure the input n must be equal or less than 7 then only call factorial function to calculate the factorial of n and display the answer (Line 19 - 20). Otherwise, the program shall just display error message.