Ders 3: C++’ta Matematiksel İşlemler

 Ders 3: C++’ta Matematiksel İşlemler

Lesson 3: Matematical Processing with C++

Mehmet Keçeci

04.04.2000

5. Örnek

#include <iostream>
using namespace std;
int x,a;
unsigned int b;
int main ()
{

a=10;
b=6;
cout<<“Topla a+b: “<<a+b<<“\n”;
cout<<“Çıkart a-b: “<<a-b<<“\n”;
cout<<“Çarp a*b: “<<a*b<<“\n”;
cout<<“Böl a/b: “<<a/b<<“\n”;
cout<<“Modülü/Kalan : “<<a%b<<“\n”;
cout<<“Küçükten Çıkart b-a: “<<b-a<<“\n”;
cout<<“a’yı bir arttır ++a : “<<++a<<“\n”;
cout<<“a: “<<a<<“\n”;
cout<<“a’ya iki ekle a+2 : “<<a+2<<“\n”;
cout<<“a++: “<<a++<<“\n” /* a++: a nın değerini gösterir fakat kendisinden sonra 1 artırır. ++a ise a nın değerini işlemden önce arttıtır.*/ ;
cout<<“a: “<<a<<“\n”;
cout<<“a+a++: “<<a+a++<<“\n”;
return 0;
}

6. Örnek sıfıra bölüm hatasını ortadan kaldıralım

 

#include <iostream>
using namespace std;

int main ()

{

int mk,tr;
cout<<“Birinci sayiyi giriniz :”<<“\\n”;
cin>>mk;
cout<<“ikinci sayiyi giriniz :”<<“\\n”;
cin>>tr;

if (tr==0) /*şayet tr 0”a eşitse ((!(tr==0)) veya (tr!=0) yaparsanız sonsuz döngü oluşur)*/
cout<<“O ile bolunemez !”<<“\\n\\n”;

else //tr 0”o eşit değilse

cout<<“Birinci sayi “<<mk<<” ile “<<tr<<” nin bolumu : “<<mk/tr <<“\\n\\n”;

return 0 ;
}

Ödev1 (Homework): if ( (x==5) && (y>x) )

7. Örnek: Switch: (Değer bir ise bunu 2 ise şunu yap gibi)

#include <iostream>
using namespace std;

int main()

{

unsigned short int mk;

cout<<“0 ile 5 arasinda bir sayi seciniz :\\n “;
cin>>mk;

switch (mk)

{

case 0: cout<<“Hayirli gunler dilerim\\n”;
break;
case 1 : cout<<” Gunaydin !!!\\n”;
break;
case 2 : cout<<“ikindi cayina bekleriz !!!\\n”;
break;
case 3 : cout<<“Aksam yemegine gelermiydiniz !!!\\n”;
break;
case 4 : cout<<“Yatiyada kalsaydiniz bari !!!\\n”;
break;
case 5 : cout<<“Gitmeyeceksiniz gibi gözukuyor bari biz kovalim !!!\\n”;
break;

default: cout<<“Lutffen 0-5 arasinda sayi seciniz\\n”;

}

cout<<“\\n”;
return 0;

}

8. Örnek: While (iken : 10’dan kükük se şunu yap)

#include <iostream>
using namespace std;

int main()

 

{

 

int mk = 0;

 

while(mk<=10) /*mk 10”dan küçük veya eşitse döngü 10+1=11 olanakadar devam eder*/

 

{
mk++; //mk”yı bir artırır.
cout<<“<mk : “<<mk<<“\\n”;
}

 

return 0;
}

9. Örnek For

#include <iostream>
using namespace std;

int main()

{

 

int mk;

for (mk=1; mk<=10; mk++) /*mk”yı 1 olarak al 10” akadar birbir arttır*/

{
cout<<mk<<“\\n”;
}

return 0;

}

Kaynaklar/References:

  1. https://github.com/PhpHunter/Cplusplus_Ornekler
(Visited 6 times, 1 visits today)
Mehmet Keçeci on FacebookMehmet Keçeci on GithubMehmet Keçeci on GoogleMehmet Keçeci on InstagramMehmet Keçeci on LinkedinMehmet Keçeci on PinterestMehmet Keçeci on RssMehmet Keçeci on TwitterMehmet Keçeci on VimeoMehmet Keçeci on WordpressMehmet Keçeci on Youtube
Mehmet Keçeci
Physicist
Mehmet Keçeci (Kececi, Kecheci)
PhD. Candidate, 2001-2003
Master of Science in Physics (MSc.): Fizik Bilim Uzmanı (1998-2001)
Occupational Safety Specialist, OSS: İş Güvenliği Uzmanı, İGU, 2016
Portion of Lesson is finished 2001-2003 (PhD. Doctorate - Physics)
Physicist: Fizikçi

Mefumetto Kecheji
メフメット ケチェジ
めふめつと けちえじ
محمت (محمد) كچه‌جى
Мехмет Кечеджи

Research Areas: Quantum Field Theory (QFT), Instanton, Conformal Field Theory (CFT), High Energy Physics (HEP), Particle Physics, High Magnetic Fields, Hydrocarbons Behaviour, Biophysics, Astrophysics, Cosmology, Cosmogony, Bioinformatics, Programming Languages, Web Servers, Information Technology (IT), Software, Operating Systems (OSs), History of Science and Technology, Philosophy of Science, Ethics, Science and Technology Management, Leadership, Morals and Religion, Interdisciplinary Relationship, Health Information System (HIS), Occupational Safety, Data Bases, Big Data, Superconductivity, Medical Physics, Radioactivity, Internet of Things (IoTs), Mathematical Physics, Electronics, Intelligent Systems, Education, Physics Education, Philosophy of Physics, Book/e-Book Publish & Edit, CMS, SEO, E-Learning, LMS, L&D, Open Digital Badges, Blockchain.

Affiliation Scientific Journals, Duty at International Scientific Publications: Reviewer

International Scientific Programs: Member of Technical Program Committee (TPC)

International Papers: 2n-Dimensional at Fujii Model Instanton-Like Solutions and Coupling Constant's Role between Instantons with Higher Derivatives. Turkish Journal of Physics
Turk. J. Phys., 35, (2011), 173-178. Mehmet Keçeci
DOI: 10.3906/fiz-1012-66

Online CV (Keçeci Model CV)
1. https://issuu.com/hiperteknoloji/docs/cv-mk (English: Keçeci Model CV, updated: Güncellenen)
2. https://www.kotobee.com/ebook/mkececi#/loading (English: Keçeci Model CV)
3. https://education.microsoft.com/Story/Lesson?token=v9eGC (English)
4. https://education.microsoft.com/Story/Lesson?token=k0o4P (Turkish)
5. https://1drv.ms/o/s!AhhtzpemsW4-hGelP3_wPK3xU9al (English)
6. https://1drv.ms/o/s!AhhtzpemsW4-hGvMecE0bYVR2I3N (Turkish)
7. https://www.youtube.com/watch?v=jq2r7-suRkw
8. https://vimeo.com/218462945
9. http://fliphtml5.com/bookcase/fxth
10. https://mix.office.com/watch/iqdf24j1efu4
11. https://docs.google.com/presentation/d/1ZR8BapjoTxcyuY-YuPFUUZvtHTiJRawEFNsn0f2XjX4/pub
12. https://sway.com/2CKhCaImWnWPz83I
13. https://docs.com/kececi/6848/kececi-model-cv
14. https://www.slideshare.net/hiperteknoloji/kececi-model-cv
15. https://issuu.com/hiperteknoloji/docs/cv-mk
16. https://education.microsoft.com/Status?token=EeDJmtL6

Leave a Comment