1. Se citeste o adresa de E-Mail( ex. Gansca_Sorinacio@Gmail.com). Sa se afiseze pe linii diferite id-ul si serverul ( Gansca_Sorinacio /n Gmail.com // Fara @ )
#include <iostream>2. Se citesc 2 adrese de mail, sa se verifice daca id-urile sunt pe acelasi server.
using namespace std;
int main()
{char a[100],*p,max[100],min[100];
int c=0,j,i,n,lmax=0,lmin=100;
cin.get (a,100);
cout<<endl;
n=strlen(a);
i=0;
while(a[i]!='@')
{cout<<a[i];
i++;}
i++;
cout<<endl;
while(a[i])
{cout<<a[i];
i++;}
}
#include <iostream>
using namespace std;
int main()
{char a[100],b[100],*p,c[100],d[100];
int j,i,m,n;
cin.get(a,100);
cin.get();
cin.get(b,100);
n=strlen(a);
m=strlen(b);
i=n-1;
j=0;
while(a[i]!='@')
{c[j]=a[i];
j++;
i--;}
i=m-1;
j=0;
while(b[i]!='@')
{d[j]=a[i];
j++;
i--;}
if(strcmp(c,d))
cout<<"Acelasi server";
else cout<<"Nu";
}