Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

int n;

int a=0;
int m=0;

string s;
cin>>n;
cin>>s;
for(int i=0;i<n;i++){
if(s[i]=='M'){
m++;
}else if(s[i]=='A'){
a++;
}
}

if( a > m )
cout<<"Ahmed";

if( a < m)
cout<<"Mostafa";
if(a==m)
cout<<"Friendship";

A > m "Ahmed"
A < m "Mostafa"
A = m "Friendship"

int x,y;
cin>>x>>y;
cout <<x<<" + "<<y<<" = "<<x+y<<"\n";
cout <<x<<" * "<<y<<" = "<<x*y<<"\n";
cout <<x<<" - "<<y<<" = "<<x-y;

‫سطور مهمه في اي برنامج‬


//
#include <bits/stdc++.h>
using namespace std;

void init(){
cin.tie(0);
cin.sync_with_stdio(0);
}

int main(){
init();

}
//

///sub String
string.substr(begining,length);

///difference

int a,b,c,d;
cin>>a>>b>>c>>d;

int x=(a*b)-(c*d);

printf("Difference =%d",x);

getline(cin,string)
will get all string on input one line

// '\0' ==> null

#iclude <Vector>
vector<int>a(size,all=ex:8)
a[5]=3;
a.push_back(3);
add to the end of array.

freopen("file_name","r",stdin);

You might also like