skip to main | skip to sidebar

FUNDAMENTAL OF PROGRAMMING

Thursday, February 17, 2011

CHAPTER THREE

SAMPLE QUESTION GIVEN BY LECTURER

bm =
bi =
math=
sains =
total =
average =
formula
total = bm + bi + math + sains
average = total / 4
coret curhat karra mc'yudied at 3:16 AM 0 comments

Tuesday, February 15, 2011

CHAPTER THREE programming

1. Go to my Computer at desktop.


2. Go to Local Disc C.


3. Click at TC's file show.


4. Click at BIN.


5. Click at TC's application.


6. Click NEW.


7. Type data ( quesion given before ).


8. After done insert data, click COMPILE.


10. Click RUN .


11. After all process insert data, compile, run done..users may insert any data (eg: number as picture show).

coret curhat karra mc'yudied at 3:17 AM 0 comments

EXERCISE C1 & C2


Add and minus two INTEGER numbers with using the formula below:


add= num1+num2
minus= num2-num1


ANSWER

# include <> #header
main ( )
{
// variable declaration
int num 1,num 2,add,minus ;
// input 1
Cout << " enter num 1 : " ;
Cin >> num 1 ;
// input 2
Cout << " enter num 2 : " ;
Cin >> num 2 ;
// formula
add = num 1 + num 2 ;
// output
Cout << add =" <<">
// formula
minus = num 2 - num 1 ;
// output
Cout << " minus = <<
minus ;
return 0 ;
}
coret curhat karra mc'yudied at 3:12 AM 0 comments

Wednesday, February 9, 2011

CHAPTER TWO example 1


#include //header
Main( ) //start body
{ // Open curly braket
//declare variable
Float area;
Float radius;
// input 1
Cout <<“enter radius”;
Cin>> radius;
//formula
area = 3.14 *radius*radius
//output
Cout <<“answer”<
Return 0 ;
} // close curly bracket
//end bracket



coret curhat karra mc'yudied at 2:53 AM 0 comments

CHAPTER TWO

#include //header
Main ( ) // start body
{ // Open curly bracket
} // close curly bracket
// comment hidden
// 1 line coding
/ * , * / all coding @ more than 1 coding

Declare variable
Data_type variable_name

Data type
Int
Integer

Float
Float
Decimal
Double
Double
Decimal
Char
Character
a-z /A-Z
String
String
Sentences
Const
Constant
Tak berubah

Rules:
1. 1. Look and aware of formula
2.Find how many variable name
3.Declare variable

Input:
Cout <<“----------------------” ;
Cin >>variable_name_that_had_declared;
Rules: carefull with spelling,alphabet small and big
Output:
Cout <<“----------------------”<<
variable_name_that_had_declared;
coret curhat karra mc'yudied at 2:45 AM 0 comments

Monday, February 7, 2011

CHAPTER ONE example 3


example 3:
find the area of fahrenheit
fahrenheit =( 9/5 *( celcius + 32 ) )


Algorithm

1.get the celcius of fahrenheit
2.calculate fahrenheit equal nine devide by five multiply celcius plus 32
3.display fahrenheit

Pseudocode

1.read celcius
2.set the fohrenheit ( 9/5 *( celcius + 32 ) )
3.print output
coret curhat karra mc'yudied at 2:37 AM 0 comments

CHAPTER ONE example 2


Example 2:
find the area of celcius
celcius = (5/9) * ( fahrenheit-32)

Algorithm

1.get the fahrenheit of celcius
2.calculate celcius equal to 5 devide by multiply by fahrenheit minus 32
3.display the area of celcius

Pseudocode:

1.read fahrenheit
2.set the celcius = (5/9) * ( fahrenheit - 32 )
3.print output
coret curhat karra mc'yudied at 2:32 AM 0 comments

CHAPTER ONE example 1


Example 1 :
Find the area of rectangle
Area = width * height

Algorithm

1.Get the width of rectangle
2.Get the height of rectangle
3.Calculate the area of rectangle with multiply width by height
4.Display the area of rectangle

Pseudocode

1.Read width
2.Read Height
3.Set the area = width * height
4.Print output

coret curhat karra mc'yudied at 2:25 AM 0 comments

CHAPTER ONE

ALGORITHM – Is sequences of instruction to solve a problem
PSEUDOCODE – Is the textual approach to illustrate an algorithm while flowchart is a graphical approach to illustrate an algorithm


coret curhat karra mc'yudied at 2:04 AM 0 comments
Newer Posts » Home
Subscribe to: Posts (Atom)

MusicPlaylist
Music Playlist at MixPod.com

Followers

counters counters
counters
 stalkers reading

chit chakkks

Blog Archive

  • ▼  2011 (16)
    • ▼  February (9)
      • CHAPTER ONE
      • CHAPTER ONE example 1
      • CHAPTER ONE example 2
      • CHAPTER ONE example 3
      • CHAPTER TWO
      • CHAPTER TWO example 1
      • EXERCISE C1 & C2
      • CHAPTER THREE programming
      • CHAPTER THREE
    • ►  March (7)

About Me

My photo
karra mc'yudied
stupid naive falling in love.. very sensitive n secretive.. love to be alone..
View my complete profile
Karra Mc'yudied II

Create your badge
Karra Mc'yudied

Create your badge

i heart u most

i heart u most
 
Copyright © FUNDAMENTAL OF PROGRAMMING. All rights reserved.
Blogger templates created by Templates Block
Wordpress theme by Uno Design Studio