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.
In most languages. Primitive data types ( char, int, float, bool, maybe string ) are usually passed by value, but compound data types are passed by reference, so you're not working on a copy but on the original.
Answer:
Originally Answered: Will there ever be a band as big as the Beatles? No, there will never be a band as popular as the Beatles. For one thing they were exceptionally good in a time of great music in general.
Explanation:
please mark this answer as brainliest
public class 4by4Square
{
public static void main(){
System.out.println("xxxx \nx x\nx x\nxxxx");
}
}
<h2><u>~CaptnCoderYankee</u></h2>
The object is said to be absorbed