Ai rezolvarea la cele 2 probleme in limbaj C++ mai jos
1.
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
cout << a + b + c;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a == b - 1)
{
cout << "Numerele sunt consecutive";
}
else
{
cout << "Numerele nu sunt consecutive";
}
return 0;
}