Răspunsuri

2014-01-27T14:20:15+02:00
#include<iostream.h>
#include<conio.h>

main(){
int a,b;
cout<<"Introduceti primul numar: ";cin>>a;
cout<<"Introduceti al doilea numar: ";cin>>b;
if(a==b-1 || a==b 1)cout<<"Numerele sunt consecutive!";
else cout<<"Numerele nu sunt consecutive!";
getch();
}
4 2 4
2014-01-27T19:20:19+02:00
#include <iostream>
using namespace std;
int a,b;
int main()
{
cin>>a>>b;
    if ( a > b)
            if(b==a+1)
                cout<<"numere consecutive " ;
    else
            if(a==b+1)
                  cout<<"numere consecutive";
return 0;
}
1 1 1