السلام عليكم ورحمة الله وبركاته
أخواني الأعضاء أرجو مساعدتي في شرح كود لبرنامج أو ترجمته
الله يوفق اللي يرد عليا ويزيده علم ومنفعة للمسلمين
هذا هو الكود
#include<string>
using namespace std;
void main()
{
char a[200];
int x,y,len,k;
cout<<"Enter sentence"<<endl;
cin.getline(a,200);
len=strlen(a);
k=len;
for(x=len-1;x>=-1;x--)
{
if((a[x]==' ') ||(x == -1 ))
{
a[x+1]=toupper(a[x+1]);
for(y=x+1;y<=k;y++)
cout<<a[y];
k=x;
}
}
cout<<endl;
system("pause");
}
#include<iostream>