<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammed Salah</title>
    <description>The latest articles on DEV Community by Mohammed Salah (@md-salah).</description>
    <link>https://dev.to/md-salah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2713765%2F5b879c79-f037-489e-8039-354d1e7572b1.jpg</url>
      <title>DEV Community: Mohammed Salah</title>
      <link>https://dev.to/md-salah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/md-salah"/>
    <language>en</language>
    <item>
      <title>C++28th code (The ternary operator in C++ )</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Tue, 04 Feb 2025 19:08:38 +0000</pubDate>
      <link>https://dev.to/md-salah/c28th-code-the-ternary-operator-in-c--43gn</link>
      <guid>https://dev.to/md-salah/c28th-code-the-ternary-operator-in-c--43gn</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std; 
    int main()
    {
float a,b;
cout&amp;lt;&amp;lt;" \n\tEnter First number : "; 
cin &amp;gt;&amp;gt; a; 
cout&amp;lt;&amp;lt;"\n\t  ===========================\n "; 
cout&amp;lt;&amp;lt;"\n\t Enter Second number : " ; 
cin&amp;gt;&amp;gt;b; 
cout&amp;lt;&amp;lt;"\n\t  ===========================\n "; 
//The ternary operator in C++
//condition ? expression1 : expression2;
float Max = (a&amp;gt;b)? (a): (b);
cout&amp;lt;&amp;lt;"\n\t The Max Value is = "&amp;lt;&amp;lt;Max; 
cout&amp;lt;&amp;lt;"\n\n\t  ===========================\n "; 
cin.get();
return 0 ; 
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
    </item>
    <item>
      <title>C++27th code (The sum of the number and the ASCII value of the character)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Thu, 30 Jan 2025 18:25:59 +0000</pubDate>
      <link>https://dev.to/md-salah/c27th-code-the-sum-of-the-number-and-the-ascii-value-of-the-character-38l0</link>
      <guid>https://dev.to/md-salah/c27th-code-the-sum-of-the-number-and-the-ascii-value-of-the-character-38l0</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std; 
    int main()
    {
int a; 
char b; 
cout&amp;lt;&amp;lt;" \n\tEnter  a number:  "; 
cin&amp;gt;&amp;gt;a; 
cout&amp;lt;&amp;lt;"\n============================================\n"&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;"\n\tEnter a charachter : "; 
cin&amp;gt;&amp;gt;b; 
cout&amp;lt;&amp;lt;"\n\t---------------------------------------\n"&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;" You have Enter --&amp;gt; "&amp;lt;&amp;lt;(a+b)&amp;lt;&amp;lt;endl; 
cin.get();
return 0; 
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
    </item>
    <item>
      <title>C++26th Code ( print the size of various data types in C++)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Thu, 30 Jan 2025 11:43:13 +0000</pubDate>
      <link>https://dev.to/md-salah/c26th-code-prints-the-size-of-various-data-types-in-c-6m2</link>
      <guid>https://dev.to/md-salah/c26th-code-prints-the-size-of-various-data-types-in-c-6m2</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;cstdint&amp;gt;
using namespace std;
int main()
{
cout&amp;lt;&amp;lt;"\n\tint          --&amp;gt;  "&amp;lt;&amp;lt;sizeof(int)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tuint8        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(uint8_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tuint16       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(uint16_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tuint32       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(uint32_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tuint64       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(uint64_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tint8_        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(int8_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tint16        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(int16_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tint32        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(int32_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tint64        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(int64_t)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tsigned       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(signed)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tunsigned     --&amp;gt;  "&amp;lt;&amp;lt;sizeof(unsigned)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tshort        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(short)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tlong         --&amp;gt;  "&amp;lt;&amp;lt;sizeof(long)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tlong long    --&amp;gt;  "&amp;lt;&amp;lt;sizeof(long long)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tfloat        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(float)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tdouble       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(double)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tLong double  --&amp;gt;  "&amp;lt;&amp;lt;sizeof(long double )&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tChar         --&amp;gt;  "&amp;lt;&amp;lt;sizeof(char)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tString       --&amp;gt;  "&amp;lt;&amp;lt;sizeof(string)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\tbool         --&amp;gt;  "&amp;lt;&amp;lt;sizeof(bool)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;"\n\twchar        --&amp;gt;  "&amp;lt;&amp;lt;sizeof(wchar_t)&amp;lt;&amp;lt;endl;
cin.get();
return 0 ;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++25th Code ( ASCII Character)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Mon, 27 Jan 2025 20:09:08 +0000</pubDate>
      <link>https://dev.to/md-salah/c25th-code-ascii-character-574c</link>
      <guid>https://dev.to/md-salah/c25th-code-ascii-character-574c</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std; 
    int main()
    {
char a; 
cout&amp;lt;&amp;lt;"\n\t Enter an English  Capital or Small letter : "; 
cin&amp;gt;&amp;gt;a;
cout&amp;lt;&amp;lt;"\n\t The ASCII Code = "; 
cout&amp;lt;&amp;lt;int(a)&amp;lt;&amp;lt;endl; 
int x ; 
cout&amp;lt;&amp;lt;"\n\t Enter an number from Ascii table to obtain The  
    symbole : " ; 
cin&amp;gt;&amp;gt;x ; 
cout&amp;lt;&amp;lt;"\n\t You have Entered number = ("&amp;lt;&amp;lt;x&amp;lt;&amp;lt;") Wich Equal --&amp;gt; 
    "&amp;lt;&amp;lt;char(x)&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;"\n"&amp;lt;&amp;lt;endl;
cin.get();
cin.get();
cin.get();
system("pause");
system("pause");
system("pause");
return 0 ; 
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++24th Code ( define Variable by Auto )</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Mon, 27 Jan 2025 17:40:04 +0000</pubDate>
      <link>https://dev.to/md-salah/c24th-code-define-variable-by-auto--4nc2</link>
      <guid>https://dev.to/md-salah/c24th-code-define-variable-by-auto--4nc2</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    #include&amp;lt;iomanip&amp;gt;
    using namespace std;
    int main()
    {
auto x=0.0 ,y=0.0 ;
cout&amp;lt;&amp;lt;" \n\tEnter The Value of  x :  ";
cin&amp;gt;&amp;gt;x;
cout&amp;lt;&amp;lt;"\n"&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;" \n\tEnter The Value of  y :  ";
cin&amp;gt;&amp;gt;y;
cout&amp;lt;&amp;lt;"\n"&amp;lt;&amp;lt;endl;
    cout&amp;lt;&amp;lt;"\n\t============================\n"&amp;lt;&amp;lt;endl;
    cout&amp;lt;&amp;lt;fixed&amp;lt;&amp;lt;setprecision(2)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;" \n\tThe sum of x + y = " &amp;lt;&amp;lt;x+y&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;" \n\tThe sub of x - y = " &amp;lt;&amp;lt;x-y&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;" \n\tThe mul of x * y = " &amp;lt;&amp;lt;x*y&amp;lt;&amp;lt;endl;
if(y!=0)
    {
    cout&amp;lt;&amp;lt;" \n\tThe div of x / y = " &amp;lt;&amp;lt;x/y&amp;lt;&amp;lt;endl;
    }
    else
    {
    cout&amp;lt;&amp;lt;" \n\t Sorry Can't Divide on Zero = Non " &amp;lt;&amp;lt;endl;
    }
cout&amp;lt;&amp;lt;"\n\tThe size of x = " &amp;lt;&amp;lt;sizeof(x)&amp;lt;&amp;lt;"  Byte"&amp;lt;&amp;lt; endl;
cout&amp;lt;&amp;lt;"\n\tThe size of y = " &amp;lt;&amp;lt;sizeof(y)&amp;lt;&amp;lt;"  Byte\n\n"&amp;lt;&amp;lt;endl;
system("pause");
cin.get();
return 0;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++23rd Code (the memory size (in bytes) of each variable type using sizeof)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Mon, 27 Jan 2025 11:19:12 +0000</pubDate>
      <link>https://dev.to/md-salah/c23rd-code-the-memory-size-in-bytes-of-each-variable-type-using-sizeof-1oei</link>
      <guid>https://dev.to/md-salah/c23rd-code-the-memory-size-in-bytes-of-each-variable-type-using-sizeof-1oei</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; #include&amp;lt;iostream&amp;gt;
 using namespace std; 
 int main()
 {
 cout&amp;lt;&amp;lt;sizeof(int)&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;sizeof(float)&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;sizeof(double)&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;sizeof(long double)&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;sizeof(char)&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;sizeof(string)&amp;lt;&amp;lt;endl;
 return 0; 
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++22nd Code--&gt; (the memory size (in bytes) of each variable type using sizeof)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Sun, 26 Jan 2025 22:02:06 +0000</pubDate>
      <link>https://dev.to/md-salah/c22nd-code-the-memory-size-in-bytes-of-each-variable-type-using-sizeof-58j4</link>
      <guid>https://dev.to/md-salah/c22nd-code-the-memory-size-in-bytes-of-each-variable-type-using-sizeof-58j4</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std; 
    int main()
    {
int x ; 
float y ; 
double z; 
long double l ; 
cout&amp;lt;&amp;lt;"Enter int number x : ";
cin&amp;gt;&amp;gt;x; 
cout&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;"Enter int number y : ";
cin&amp;gt;&amp;gt;y; 
cout&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;"Enter int number z : ";
cin&amp;gt;&amp;gt;z; 
cout&amp;lt;&amp;lt;endl; 
    cout&amp;lt;&amp;lt;"Enter int number l : ";
cin&amp;gt;&amp;gt;l; 
cout&amp;lt;&amp;lt;endl; 
cout&amp;lt;&amp;lt;sizeof(x)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;sizeof(y)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;sizeof(z)&amp;lt;&amp;lt;endl;
cout&amp;lt;&amp;lt;sizeof(l)&amp;lt;&amp;lt;endl;
cin.get();
return 0 ; 
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
    </item>
    <item>
      <title>C++21st Code(Your age by year , month,days,hrs,min,seconds)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Sun, 26 Jan 2025 11:22:43 +0000</pubDate>
      <link>https://dev.to/md-salah/c21th-codeyour-age-by-year-monthdayshrsminseconds-19c3</link>
      <guid>https://dev.to/md-salah/c21th-codeyour-age-by-year-monthdayshrsminseconds-19c3</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std;
    int main()
    {
     cout&amp;lt;&amp;lt;"\n\t\t=============================================\n";
     cout&amp;lt;&amp;lt;"\n\t\t ===( Your age in years, months, days, minutes and 
    seconds )==\n";
    cout&amp;lt;&amp;lt;"\n\t\t 
    ======================================================\n";
    double a ;
    cout&amp;lt;&amp;lt;"\n \n\t\t Enter Your age by years : ";
    cin&amp;gt;&amp;gt;a;
    cout&amp;lt;&amp;lt;"\n \n\t\t Your age is "&amp;lt;&amp;lt;a&amp;lt;&amp;lt;" Years " ;
    cout&amp;lt;&amp;lt;"\n  \n \t\t = \t    " &amp;lt;&amp;lt; (a*12)&amp;lt;&amp;lt;" Months ";
    cout&amp;lt;&amp;lt;"\n  \n \t\t = \t    "&amp;lt;&amp;lt; (a*365)&amp;lt;&amp;lt;" days";
    cout&amp;lt;&amp;lt;"\n  \n \t\t = \t    "&amp;lt;&amp;lt; (a*365*24)&amp;lt;&amp;lt;" Hours";
    cout&amp;lt;&amp;lt;"\n  \n \t\t = \t    "&amp;lt;&amp;lt; ((a*365*24*60))&amp;lt;&amp;lt;" Miniutes";
    cout&amp;lt;&amp;lt;"\n  \n \t\t = \t    "&amp;lt;&amp;lt; (a*365*24*60*60)&amp;lt;&amp;lt;" Seconds\n";
    cout&amp;lt;&amp;lt;"\n\t\t=========================================" &amp;lt;&amp;lt;endl;
    cin.get();
    return 0;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++20th Code (Constant by #define) --&gt;Not prefere</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Sun, 26 Jan 2025 09:49:02 +0000</pubDate>
      <link>https://dev.to/md-salah/c20th-code-constant-by-define-not-prefere-42kk</link>
      <guid>https://dev.to/md-salah/c20th-code-constant-by-define-not-prefere-42kk</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std;
    #include&amp;lt;iomanip&amp;gt;
    #define con 3.1415926535897932384626433832795
    int main()
    {
    cout&amp;lt;&amp;lt;fixed&amp;lt;&amp;lt;setprecision(15);
    cout&amp;lt;&amp;lt;con&amp;lt;&amp;lt;endl;
    cin.get();
    return con;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
    </item>
    <item>
      <title>C++19th Code ( postfix &amp; Prefix) --&gt; (X++) &amp; (++X)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Sat, 25 Jan 2025 20:39:47 +0000</pubDate>
      <link>https://dev.to/md-salah/c19th-code-postfix-prefix-x-x-5ecl</link>
      <guid>https://dev.to/md-salah/c19th-code-postfix-prefix-x-x-5ecl</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; #include&amp;lt;iostream&amp;gt;
 using namespace std; 
 int main()
 {
 int x = 1; 
 ++x;
 cout&amp;lt;&amp;lt;" x = "&amp;lt;&amp;lt;x++&amp;lt;&amp;lt;endl;
 cout&amp;lt;&amp;lt;" new x = "&amp;lt;&amp;lt;x&amp;lt;&amp;lt;endl;
 return 0 ;
 }  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>C++18th code ( start each line with ; ) --&gt; Not clean code</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Sat, 25 Jan 2025 19:58:42 +0000</pubDate>
      <link>https://dev.to/md-salah/c18th-code-start-each-line-with-not-clean-code-43n6</link>
      <guid>https://dev.to/md-salah/c18th-code-start-each-line-with-not-clean-code-43n6</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    #include&amp;lt;iostream&amp;gt;
    using namespace std; 
    int main()
    {
cout&amp;lt;&amp;lt;"\n Welcome With Md salah in C++ "
;cout&amp;lt;&amp;lt;"\n The syntax could be write as this shape"
;cout&amp;lt;&amp;lt;"\n But this is a bad shape "
;cout&amp;lt;&amp;lt;"\n So Try To Write  a clean code "&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl; 
return 0 ;  
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
      <category>cleancode</category>
    </item>
    <item>
      <title>C++17th code--&gt; [Constant (pi) &amp; iomanpi ] with Precision (51)</title>
      <dc:creator>Mohammed Salah</dc:creator>
      <pubDate>Fri, 24 Jan 2025 21:32:36 +0000</pubDate>
      <link>https://dev.to/md-salah/c17th-code-constant-pi-iomanpi-with-precision-51-2e39</link>
      <guid>https://dev.to/md-salah/c17th-code-constant-pi-iomanpi-with-precision-51-2e39</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;iomanip&amp;gt;
using namespace std; 
int main()
{
const  double pi=22.0/7.0;
cout&amp;lt;&amp;lt;fixed&amp;lt;&amp;lt;setprecision(51); 
cout&amp;lt;&amp;lt;"\n\t Pi = "&amp;lt;&amp;lt;pi&amp;lt;&amp;lt;endl; 
cin.get();
system("pause"); 
return 0 ; 
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
