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:
Explanation:
- We declare the variable about the zoo with the owl's quantity, we could put any integer.
- We make the sum operation zooA + zooB, with the variable total_owls.
- we print the result about the two zoo.
num_owls_zooA= 3
num_owls_zooB = 4
total_owls = 0
total_owls = num_owls_zooA + num_owls_zooB
print('Number of owls:', total_owls)
Answer:
There is no difference between ‘’ and “” string type in python. Both are used to hold the string or sequence of character in the python. triple """ """ can also use for the same.
Example:
str1 = "aeiou"
str2 = 'aeiou'
str3 =""" hello"""
print(type(str1), type(str2),type(str3))
<class 'str'> <class 'str'> <class 'str'>
Here all are used to hold string or sequence of character.
Answer:
Within the food chain energy can be passed and transferred from one organism to another. Whilst mammals get their energy sources from food – whether this be eating other animals or eating vegetation; plants get their energy from photosynthesis. Energy is passed between organisms through the food chain.
Explanation:
plese mark me branilst