Want this question answered?
Be notified when an answer is posted
Chat with our AI personalities
Input N1, N2, N3 Max = N1 If N2 > Max then Max = N2 If N3 > Max then Max = N3 Display Max
#include <iostream> bool isPrime(int p) { if( p<=1 ( p>2 && p%2==0 ))return( false );int max = (int)sqrt(( double ) p ) + 1;for( int i=3; i<=max; i+=2 )if( p%i==0 )return( false );return( true ); } int main() { int primes[10]; int count=0, num=0; while( count!= 10 ) {num+=num>2?2:1;if( isPrime(num) )primes[count++]=num;}for( int i=0; i<10; ++i )std::cout << primes[i] << std::endl;return( 0 ); }
ماكس
max = a > b ? a : b; max = max > c ? max : c;
Max Guevera was played by Jessica Alba.