SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
TUGAS II ALGORITMA DAN PEMROGRAMAN 2A 1. Mengubah derajat temperatur, dari derajat Celcius ke derajat Fahreinheit dan Reamur (derajat Celcius diinput)   PROGRAM celcius; USES CRT; VAR F,C,R : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(BLUE); TEXTCOLOR(BROWN); SOUND(220); GOTOXY(10,6); WRITE('Nilai Celcius : ');READLN(C); F := 1.8 * C + 32; R := 0.8 * C; GOTOXY(10,7); WRITELN (C:6:2,' Celcius sama dengan ',F:6:2,' Farenheit '); GOTOXY(10,8); WRITELN (C:6:2,' Celcius sama dengan ',R:6:2,' Reamur '); READLN; END.
OUTPUT :
2. Menghitung Luas dan Keliling lingkaran, dengan jari-jari diketahui (diinput).   uses crt; var jari,luas,keliling : real; begin clrscr; window(7,7,25,80); textbackground(green); textcolor(yellow); sound(220); gotoxy(1,4); writeln('==menghitung luas dan keliling lingkaran=='); gotoxy(1,6); write('masukan jari-jari = '); readln(jari); luas:=3.14*jari*jari; keliling:=2*3.14*jari; gotoxy(1,7); writeln('luas : ',luas:6:2); gotoxy(1,8); writeln('keliling : ',keliling:6:2); readln; end.
OUTPUT :
3. Menghitung Luas dan Keliling segitiga sembarang yang diketahui ke tiga sisinya .   PROGRAM SEGITIGA; USES CRT; VAR A,B,C,K,L,N,keliling: REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(RED); TEXTCOLOR(WHITE); SOUND(220); GOTOXY(10,3); WRITE('SISI 1 : ');READLN(A); GOTOXY(10,4); WRITE('SISI 2 : ');READLN(B); GOTOXY(10,5); WRITE('SISI 3 : ');READLN(C); keliling := A+B+C; K := 1/2*keliling; N := K*(K-A)*(K-B)*(K-C); GOTOXY(10,6); WRITELN('Keliling Segitiga : ',keliling:6:2); GOTOXY(10,7); WRITELN('Luas Segitiga : ',SQRT(N):6:2); NOSOUND; READLN; END.
OUTPUT :
4. Mencari nilai Sinus, Cosinus, dan Tangen dengan sudut diinput.   USES CRT; VAR sudut : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(BROWN); TEXTCOLOR(WHITE); SOUND(220); GOTOXY(35,5); WRITE('MASUKKAN NIALI SUDUT : ');READLN(sudut); GOTOXY(35,6); WRITELN('Sinus : ',SIN(sudut):6:2); GOTOXY(35,7); WRITELN('Cosinius : ',COS(sudut):6:2); GOTOXY(35,8); WRITELN('Tangen : ',ARCTAN(sudut):6:2); NOSOUND; READLN; END.
OUTPUT :
5. Mencari akar dan kuadrat dari suatu nilai (nilai diinput).   USES CRT; VAR N : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLUE); GOTOXY(10,3); SOUND(220); WRITE('Masukkan Nilai : ');READLN(N); GOTOXY(10,5); WRITELN('Nilai N dipangkatkan : ',SQR(N):9:2); GOTOXY(10,6); WRITELN('Nilai N diakarkan : ',SQRT(N):9:2); NOSOUND; READLN; END.
OUTPUT :
6. Mencari nilai bulat dan pecahan dari suatu nilai yang dimasuk kan melalui keyboard (diinput). Nilai pecahan tersebut dibulatkan sampai 3 angka dibelakang koma (,).   USES CRT; VAR A : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(YELLOW); TEXTCOLOR(RED); SOUND(220); GOTOXY(15,5); WRITE('Masukkan Nilai : ');READLN(A); GOTOXY(12,7); WRITELN('Nilai Bulatnya: ',INT(A):6:3); GOTOXY(12,8); WRITELN('Nilai Pecahannya : ',FRAC(A):6:3); READLN; END.
OUTPUT  :
7. Tampilkan nama dan NPM anda di dalam window, dan terletak pada tengahtengah layar.   PROGRAM Layar; USES CRT; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(GREEN); SOUND(220); GOTOXY(30,10); WRITELN('Nama : Bestiria Reska'); GOTOXY(33,11); WRITELN('Kelas : 1 KA 20'); NOSOUND; READLN; END.
OUTPUT  :
8. Tampilkan tulisan 'STMIK GUNADARMA' di dalam window pada pojok kanan atas dengan ukuran window sama dengan tulisan tersebut.!   PROGRAM Layar2; USES CRT; BEGIN CLRSCR; WINDOW(2,2,15,50); TEXTBACKGROUND(BLUE); TEXTCOLOR(YELLOW); SOUND(220); GOTOXY(65,1); WRITELN('STMIK GUNADARMA'); NOSOUND; READLN; END.
OUTPUT  :

Mais conteúdo relacionado

Destaque

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Destaque (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Tugas Ii Algoritma Dan Pemrograman 2 A

  • 1. TUGAS II ALGORITMA DAN PEMROGRAMAN 2A 1. Mengubah derajat temperatur, dari derajat Celcius ke derajat Fahreinheit dan Reamur (derajat Celcius diinput)   PROGRAM celcius; USES CRT; VAR F,C,R : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(BLUE); TEXTCOLOR(BROWN); SOUND(220); GOTOXY(10,6); WRITE('Nilai Celcius : ');READLN(C); F := 1.8 * C + 32; R := 0.8 * C; GOTOXY(10,7); WRITELN (C:6:2,' Celcius sama dengan ',F:6:2,' Farenheit '); GOTOXY(10,8); WRITELN (C:6:2,' Celcius sama dengan ',R:6:2,' Reamur '); READLN; END.
  • 3. 2. Menghitung Luas dan Keliling lingkaran, dengan jari-jari diketahui (diinput).   uses crt; var jari,luas,keliling : real; begin clrscr; window(7,7,25,80); textbackground(green); textcolor(yellow); sound(220); gotoxy(1,4); writeln('==menghitung luas dan keliling lingkaran=='); gotoxy(1,6); write('masukan jari-jari = '); readln(jari); luas:=3.14*jari*jari; keliling:=2*3.14*jari; gotoxy(1,7); writeln('luas : ',luas:6:2); gotoxy(1,8); writeln('keliling : ',keliling:6:2); readln; end.
  • 5. 3. Menghitung Luas dan Keliling segitiga sembarang yang diketahui ke tiga sisinya .   PROGRAM SEGITIGA; USES CRT; VAR A,B,C,K,L,N,keliling: REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(RED); TEXTCOLOR(WHITE); SOUND(220); GOTOXY(10,3); WRITE('SISI 1 : ');READLN(A); GOTOXY(10,4); WRITE('SISI 2 : ');READLN(B); GOTOXY(10,5); WRITE('SISI 3 : ');READLN(C); keliling := A+B+C; K := 1/2*keliling; N := K*(K-A)*(K-B)*(K-C); GOTOXY(10,6); WRITELN('Keliling Segitiga : ',keliling:6:2); GOTOXY(10,7); WRITELN('Luas Segitiga : ',SQRT(N):6:2); NOSOUND; READLN; END.
  • 7. 4. Mencari nilai Sinus, Cosinus, dan Tangen dengan sudut diinput.   USES CRT; VAR sudut : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(BROWN); TEXTCOLOR(WHITE); SOUND(220); GOTOXY(35,5); WRITE('MASUKKAN NIALI SUDUT : ');READLN(sudut); GOTOXY(35,6); WRITELN('Sinus : ',SIN(sudut):6:2); GOTOXY(35,7); WRITELN('Cosinius : ',COS(sudut):6:2); GOTOXY(35,8); WRITELN('Tangen : ',ARCTAN(sudut):6:2); NOSOUND; READLN; END.
  • 9. 5. Mencari akar dan kuadrat dari suatu nilai (nilai diinput).   USES CRT; VAR N : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLUE); GOTOXY(10,3); SOUND(220); WRITE('Masukkan Nilai : ');READLN(N); GOTOXY(10,5); WRITELN('Nilai N dipangkatkan : ',SQR(N):9:2); GOTOXY(10,6); WRITELN('Nilai N diakarkan : ',SQRT(N):9:2); NOSOUND; READLN; END.
  • 11. 6. Mencari nilai bulat dan pecahan dari suatu nilai yang dimasuk kan melalui keyboard (diinput). Nilai pecahan tersebut dibulatkan sampai 3 angka dibelakang koma (,).   USES CRT; VAR A : REAL; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(YELLOW); TEXTCOLOR(RED); SOUND(220); GOTOXY(15,5); WRITE('Masukkan Nilai : ');READLN(A); GOTOXY(12,7); WRITELN('Nilai Bulatnya: ',INT(A):6:3); GOTOXY(12,8); WRITELN('Nilai Pecahannya : ',FRAC(A):6:3); READLN; END.
  • 13. 7. Tampilkan nama dan NPM anda di dalam window, dan terletak pada tengahtengah layar.   PROGRAM Layar; USES CRT; BEGIN CLRSCR; WINDOW(7,7,25,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(GREEN); SOUND(220); GOTOXY(30,10); WRITELN('Nama : Bestiria Reska'); GOTOXY(33,11); WRITELN('Kelas : 1 KA 20'); NOSOUND; READLN; END.
  • 15. 8. Tampilkan tulisan 'STMIK GUNADARMA' di dalam window pada pojok kanan atas dengan ukuran window sama dengan tulisan tersebut.!   PROGRAM Layar2; USES CRT; BEGIN CLRSCR; WINDOW(2,2,15,50); TEXTBACKGROUND(BLUE); TEXTCOLOR(YELLOW); SOUND(220); GOTOXY(65,1); WRITELN('STMIK GUNADARMA'); NOSOUND; READLN; END.