#include#include#includeint main (){float a,b,c,d,x1,x2,re,im;cout<<" Cara cepat mencari nilai akar-akar persamaan kuadrat...Check it out!"cin>>a;cout<<"

Slides:



Advertisements
Similar presentations
PHYS707: Special Topics C++ Lectures Lecture 2. Summary of Today’s lecture: 1.More data types 2.Flow control (if-else, while, do-while, for) 3.Brief introduction.
Advertisements

SELEKSI IF & CASE. if dengan 1 statement If skor > 8 then Nilai:=‘A’ IF dengan banyak statement If skor > 8 then Begin Nilai := ‘A’; Lulus :=True; Bonus.
The "if structure" is used to execute statement(s) only if the given condition is satisfied.
Matematika Ekonomi FUNGSI.
Prosedur dan Fungsi.
Template Implicit function overload. Function overload Function overload double ssqq(double & a, double & b) { return(a*b);} float ssqq(float & a, float.
Class Scope class Student { private: string id; string firstName, lastName; float gpa; public: void Read() { cin >> id >> firstName >> lastName >> gpa;
Review of Inheritance. 2 Several Levels of Inheritance Base Class B Derived class D Derived class D1.
Scientific Programming for(i=0; i b) { a = func1(c,d,i*10); } else if(a < b) { a = func2(e,f,i*10); } else { a = func3(g,h,i*10);
1 Class Vehicle #include #define N 10../.. 2 Class Vehicle class vehicle { public: float speed; char colour[N+1]; char make[N+1];
1. MIXED NUMBER / MIXED FRACTION 2. DECIMAL FRACTIONS, PERCENTAGE AND PER MILLE 3. COMPARING TWO FRACTION 4. ADDITION OF FRACTIONS 5. SUBTRACTION OF FRACTIONS.
CREATE ALTER DROP Stored Procedure. Apa itu Stored Procedure?? kumpulan perintah SQL yang diberi nama dan disimpan dalam server Sekumpulan pernyataan.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level Oleh : M. Rafie Pawellangi.
Ketidaktentuan –Tidak lengkap –tidak konsisten, –tidakpasti… atau ketiga- tiganya sekali.
Pembolehubah dan Pemalar
Nested Loops. For i = 1 To 5 For j = 1 To 6 picOutput.Print "*"; Next j picOutput.Print Next i.
Examples from “c++ how to program” book. SELECTIONS WITH IF-ELSE Example: if ( grade >= 60) cout = 60) cout
Chapter 05 (Part V) Control Statements: Part II. Nested For-Structures Consider the following codes: for (int i=0; i
Computer Science Department Relational Operators And Decisions.
Lecture-13 Instructor Name: Muhammad Safyan Programming Fundamental.
Searching Dr. Jose Annunziato. Linear Search Linear search iterates over an array sequentially searching for a matching element int linearSearch(int haystack[],
Lab Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items.
CSC 107 – Programming For Science. Today’s Goal  When lecture over, start understanding pointers  What a pointer is and what it is not  Why pointers.
CSC 107 – Programming For Science. Today’s Goal  When lecture over, start understanding pointers  What a pointer is and what it is not  Why pointers.
Lecture 4 Function example. Example1 int max (int a, int b) { int c; if (a > b) c = a; else c = b; return (c); } void main ( ) {int x, y; cin>>x>>y; cout.
Class Constructors class Student { private: string id, firstName, lastName; float gpa; public: Student() Student(string sID) Student(string first, string.
Statements
Linear Equations with One Variable. Basic Competence : To solve linear equation with one variable Indicator : Students understanding linear equation with.
LESSON 4 Decision Control Structure. Decision Control Structures 1. if statement 2. if-else statement 3. If-else-if statement 4. nested if statement 5.
Think First, Code Second Understand the problem Work out step by step procedure for solving the problem (algorithm) top down design and stepwise refinement.
Class Method Read class Student { private: string id; string firstName, lastName; float gpa; public: // Will the method change any data members? // Yes!
 Memory setup  Pointer declaration  Address operator  Indirection  Printing addresses or pointers.
POINTER I POINTER DECLARATION DECLARATION BY DYNAMIC POINTER.
FLOW OF CONTROL In C++ the program execution starts with the first statement in the main() and ends with the last statement of main(). This is called.
Asif Nawaz University Institute of Information Technology, PMAS-AAUR Lecture 05: Object Oriented Programming:2014 Object-Oriented Programming in C++ Exception.
C++ CODES PART#04 1 COPY ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT.
LESSON 5 Loop Control Structure. Loop Control Structure  Operation made over and over again.  Iterate statement.
Part 2 Variabel & Data types
by: Muhammad Zidny Naf’an;
Variabel Dan Tipe data
Pertemuan 1&2 - Dasar Pemrograman PHP
PUBLIKASI ILMIAH (PELACAKAN SEARCH ENGINE) BOOLEAN LOGIC
ITEC 2600 Introduction to Analytical Programming
Dikompilasi Oleh : Ary Bima Kurniawan ST., MT.
LESSON 4 Decision Control Structure
NOR SYUHADA BINTI MOHD NOR HILME
Variabel Dan Tipe data
Play Game Options Credits Template ini dibuat oleh : Johan Kurniawan
ASAS PENGATURCARAAN C++
PRAKARYA BAHAN LUNAK WAHID RIZAL F.. PENGERTIAN BAHAN LUNAK Bahan lunak adalah bahan yang memiliki sifat fisik empuk/lunak sehingga sangat mudah dibentuk.
爱吾兴中 吾爱兴中 CONTACT HOUR 15 OCTOBER 2015 (THURSDAY)
Bagaimana cara membuat
CS 1430: Programming in C++.
Introduction to Programming
Recursive decent parsing
تصمیم‌گیری و کنترل روند، استفاده از حلقه‌ها و دستورات شرطی در متلب
Character & String Knowledge
NAMA : YEOH ZHI YING NO. MATRIC : A FAKULTI : FARMASI
COPY ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT
CS 1430: Programming in C++.
RESONANCE (SALUNAN).
Dikompilasi Oleh : Ary Bima Kurniawan ST., MT.
Pembolehubah dan Pemalar
Conditional Statements
Function Overloading.
DeMorgan's & related Laws
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
Programming Fundamental
Programming Fundamental
MARGIE'S TRAVEL 1 M KURVA SELEKTIVITAS UNTUK RANGKAIAN RESONAN PARALEL Kelompok 8.
Presentation transcript:

#include#include#includeint main (){float a,b,c,d,x1,x2,re,im;cout<<" Cara cepat mencari nilai akar-akar persamaan kuadrat...Check it out!"cin>>a;cout<<" Masukkan nilai b : ";cin>>b;cout<<" Masukkan nilai c : ";cin>>c;//itung D dulud=b*b-4*a*c;//liat hasilnyaif (d>0){x1=(-b+sqrt(d))/(2*a);x2=(-b-sqrt(d))/(2*a);cout<<" x1 = "<cout<<" x2 = "<}elseif (d==0){x1=-b/(2*a);x2=x1;cout<<" Akar kembar cuy! ";cout<<" x1 = "<cout<<" x2 = "<}else //d<0{re=-b/(2*a);im=sqrt(fabs(d))/(2*a);cout<<" Akar bingung ";cout<<" x1 = "<cout<<" x2 = "<}cout<<" Dibuat oleh saya Tyas Istiqomah "<cout<<" Yang NIMnya 080810191 "<getch ();}triiimmmzzzz^^