SIZ Education || Program of C++ || by @ahsansharif

in Steem Infinity Zone3 years ago

Assalam-u-Alikum!

I hope all SIZ family is well and good. Now I am sharing C++ program. I hope this is more beneficial for IT and CS students.

image.png

So here I show some program of C++.

(01) Find maximum value using C++.

#include
using namespace std;
int main()
{
int i, a[10], max;
cout<<"please enter an array of 10 elements :";
for(i=0; i<10; i++)
{
cout<<i+1<<"please enter number :";
cin>>a[i];
}
max=a[0];
for(i=0; i<10; i++)
if(max<a[i])
max = a[i];
cout<<"the maximum number :"<<max;
return 0;
}

OUTPUT

01.PNG

Divider 2.png

(02) Find Even Number using C++

#include
using namespace std;
int main()
{
int i,s,e;
cout<<"please enter strating value =";
cin>>s;
cout<<"please enter ending value =";
cin>>e;
for(i=2; i<=10; i+=2)
cout<<i<<" ";
}

OUTPUT

002.PNG

Divider 2.png

(03) Find odd number using C++

#include
using namespace std;
int main()
{
int i,s,e;
cout<<"please enter strating value =";
cin>>s;
cout<<"please enter ending value =";
cin>>e;
for(i=2; i<=10; i++)
if(i%2==1)
cout<<i<<" ";
}

OUTPUT

03.PNG

NOTE:

I didn't write iostream next to #include because it's an HTML symbol that doesn't post on steemit.

Divider 2.png

I am very thankful sir @cryptokraze who gave a chance to make post about anything related steemit.

1620475447469.png

Divider 1.png

Regards: @ahsansharif

Footer.png

Sort:  

Good its very helpful for us. programming is so tough. If we learn it carefully then its so easy.

 3 years ago 

Yes you are right

 3 years ago 

good work bro.
keep it up.

 3 years ago 

Thanks bro

 3 years ago 

welcome dear

Very informative post .Good work. Keep it up

 3 years ago 

Thanks

 3 years ago 

very informative and easy for cs students and also for beginners that want to learn c++

 3 years ago 

Yes you are right thanks for participation

Thanks for sharing a C++ program. Its very beneficial for us.

 3 years ago 

welcome dear yes right

Its better for CS and IT students

 3 years ago 

of course

Thanks for sharing . I love coding

 3 years ago 

wow you love coding

Your post is very informative

 3 years ago 

thanks for participating

Very informative post good work bro.

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.029
BTC 61409.80
ETH 3358.74
USDT 1.00
SBD 2.49