Answer:
#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n)
{
for(int j=2;j<=n-1;j++) //loop to check prime..
{
if(n%j==0)
return false;
}
return true;
}
int main(){
int n;
cout<<"Enter the integer"<<endl;//taking input..
cin>>n;
if(isPrime(n))//printing the message.
{
cout<<"The number you have entered is prime"<<endl;
}
else
{
cout<<"The number is not prime"<<endl;
}
return 0;
}
Output:-
Enter the integer
13
The number you have entered is prime
Explanation:
The above written program is in C++.I have created a function called isPrime with an argument n.I have used a for loop to check if the number is prime or not.In the main function I have called the function isPrime for checking the number is prime or not.
I suggest you to read OpenSSL changelogs to make it more clear. As there's not enough space to describe how it works. But heartbleed resistan version was 1.0.2, as I know.
Answer:
Following are the program in Python programming language
def pyramid_volume(base_length,base_width,pyramid_height):
base_area=base_length*base_width
volume=base_area*pyramid_height*(1/3)
return volume
print('volume for 4.5,2.1,3.0 is:',pyramid_volume(4.5,2.1,3.0))
Explanation:
Here, we define a function "pyramid_volume()" and pass an arguments "base_length,base_width,pyramid_height"
inside that program we have calculated the area of the pyramid and after that we have calculated the volume of that pyramid and return the volume.
Outside of the function we have called the function by passing the arguments.
A
joystick is less likely to be used while creating this presentation. Obviously, If your intention is to create an audio-visual presentation on animated movies, a computer should be used. With a computer, comes a keyboard, a mouse and a microphone as well.
A Joystick is used to control video games and play simulator games. Therefore, I do not see the need of using a joystick in this situation.
I got $27.72 is 6% of $462.