Răspuns:
a)
#include<iostream>
using namespace std;
int main()
{
int A, B;
cin>>A>>B;
while (A<=B)
{
if(A%3==0)
cout<<A<<'' '' ;
A++;
}
return 0;
}
b)
#include<iostream>
using namespace std;
int main()
{
int A, B;
cin>>A>>B;
do
{
if(A%3==0)
cout<<A<<'' '' ;
A++;
}
while (A<=B)
return 0;
}