👤

Am pus poza mai jos, daca se poate rapid ca am teza si am lipsit f mult din probleme medicale

Am Pus Poza Mai Jos Daca Se Poate Rapid Ca Am Teza Si Am Lipsit F Mult Din Probleme Medicale class=

Răspuns :

Salut. Uite aici rezolvarea problemelor. Succes in continuare!


1)

#include <iostream>

using namespace std;


int main()
{
       int n, x;
       int nr = 0;

       cin >> n;

       while (n != 0)
       {
               cin >> x; 
              if (x >= 10 && x <= 100)
                        nr++;

          n--;
       }

     cout << nr;
    return 0;
}


2)


#include <iostream>
#include <math.h>

using namespace std;


int main()
{
         int n, ok, d = 2;

         cin >> n;
         ok = 1;

         while (d <= sqrt(n))
         {
                  if (n % d == 0)
                           ok = 0;

                d++;
          }

         if (ok == 1)
                cout << "NR. PRIM!";
         else
                cout << "NR. NEPRIM!";

     return 0;
}


3)

#include <iostream>

using namespace std;


int main()
{
        int n, c, min = 9;

        cin >> n;

        while (n != 0)
        {
               c = n % 10;
               if (c < min)
                     min = c;

              n = n / 10;
        }

      cout << min;

   return 0;
}
1)
var a:array of integer;
n,i,nr:integer;

begin
read(n);
setlength(a,n);
writeln;

for i:=0 to n-1 do begin
read(a[i]);
if (a[i]<=100) and (a[i]>=10) then inc(nr);
end;

writeln;
writeln(nr);
end.


2)
var i,n,x:integer;

begin
read(n);
writeln;

for i:=1 to n do 
if (n mod i = 0) then inc(x); 

if x=2 then writeln('DA') 
else writeln('NU');
end.


3)
var s,min:string;
i:integer;

begin
read(s);
writeln;

min:=s[1];

for i:=1 to length(s) do
if s[i]<min then min:=s[i];

writeln(min);
end.