Răspuns:
A doua
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
cout << a/b << "," << a%b;
return 0;
}
A treia
#include <iostream>
using namespace std;
int main()
{
int n,s;
cin >> n;
if(9<n && n<=99)
{
s=0;
while(n!=0)
{
s=s+n%10;
n=n/10;
}
}
cout << s;
return 0;
}
A patra
#include <iostream>
using namespace std;
int main()
{
int n,ogl;
cin >> n;
if(9<n && n<=99)
{
while(n!=0)
{
ogl=ogl*10+n%10;
n=n/10;
}
}
cout << ogl;
return 0;
}
A cincea
#include <iostream>
using namespace std;
int main()
{
int n,ogl;
cin >> n;
if(9<n && n<=999)
{
while(n!=0)
{
ogl=ogl*10+n%10;
n=n/10;
}
}
cout << ogl;
return 0;
}
Explicație: