Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /home/reshajt1/public_html/wp-includes/wp-db.php on line 760

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/reshajt1/public_html/wp-includes/comment-template.php on line 1747

Deprecated: Creation of dynamic property Disable_Comments::$is_CLI is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 59

Deprecated: Creation of dynamic property Disable_Comments::$sitewide_settings is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 61

Deprecated: Creation of dynamic property Yoast\WP\SEO\Main::$helpers is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 65

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block-type.php on line 391

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block-type.php on line 391

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home/reshajt1/public_html/wp-includes/pomo/translations.php on line 292

Deprecated: Implicit conversion from float 1789181098.96688 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home/reshajt1/public_html/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home/reshajt1/public_html/wp-includes/pomo/translations.php on line 292

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$disabled_wp_cron is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 69

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$enable_self_cron is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 70

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$require_optin is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 74

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$include_goodbye_form is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 75

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$marketing is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 76

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$options is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 77

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$item_id is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 78

Deprecated: Creation of dynamic property Disable_Comments::$tracker is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/disable-comments.php on line 150

Deprecated: Creation of dynamic property DisableComments_Plugin_Tracker::$notice_options is deprecated in /home/reshajt1/public_html/wp-content/plugins/disable-comments/includes/class-plugin-usage-tracker.php on line 657

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-term-query.php on line 1118

Warning: Cannot modify header information - headers already sent by (output started at /home/reshajt1/public_html/wp-includes/wp-db.php:760) in /home/reshajt1/public_html/wp-includes/feed-rss2.php on line 8
<br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Surfaces\Classes_Surface::$container is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php</b> on line <b>20</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Main::$classes is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/lib/abstract-main.php</b> on line <b>65</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$page_type is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>43</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$pagination is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/archive-adjacent-trait.php</b> on line <b>29</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$source is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>64</b><br /> <br /> <b>Deprecated</b>: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation::$title is deprecated in <b>/home/reshajt1/public_html/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php</b> on line <b>64</b><br /> program Archives - ReshaJTama https://reshajtama.my.id Share Anything Sat, 11 May 2024 17:06:38 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.14 https://reshajtama.my.id/wp-content/uploads/2022/05/cropped-cropped-Logo-32x32.png program Archives - ReshaJTama https://reshajtama.my.id 32 32 Cara Membuat CRUD PHP : Part 01 Membuat Database https://reshajtama.my.id/cara-membuat-crud-php-part-01-membuat-database/ Sat, 23 Jul 2022 05:37:02 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383
https://reshajtama.my.id/?p=456 Deprecated: Implicit conversion from float 1789181099.000526 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789181099.000794 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Selamat datang kembali teman teman di web saya, kali ini saya akan membagikan tutorial CRUD ( Create Read Update Delete ) pada bahasa pemrogran PHP. Teman teman yg baru belajar dapat mengikuti tutorial ini. CRUD adalah suatu metode yang sangat umum dipakai pada suatu web. terutama pada bahasa pemrograman php. Pengertian CRUD adalah kepanjangan dari …

The post Cara Membuat CRUD PHP : Part 01 Membuat Database appeared first on ReshaJTama.

]]>

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home/reshajt1/public_html/wp-includes/class-wp-block.php on line 179

Deprecated: Implicit conversion from float 1789181099.002376 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789181099.00242 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93
Selamat datang kembali teman teman di web saya, kali ini saya akan membagikan tutorial CRUD ( Create Read Update Delete ) pada bahasa pemrogran PHP. Teman teman yg baru belajar dapat mengikuti tutorial ini. CRUD adalah suatu metode yang sangat umum dipakai pada suatu web. terutama pada bahasa pemrograman php.

Pengertian CRUD adalah kepanjangan dari Create, Read, Update dan Delete. Keempat istilah ini merupakan perintah atau query yang digunakan programmer untuk melakukan aksi melalui database relasional.

Sebelum membuat CRUD, kita harus membuat sebuah database yang akan dijadikan sebagai penyimpanan nya nanti. saya menggunakan database mysql disini. Kalian bisa menginstall Paket XAMPP, karena program XAMPP telah menyediakan paket lengkap nya.

Untuk Program XAMPP anda dapat mendownload nya langsung di website resminya :

Setelah di download & di install langsung di jalankan saja, jika tidak bisa menginstall dan menjalan kannya. Temen temen bisa melihat artikel saya sebelum nya di sini :

Install dan menjalankan Xampp

Oke kita langsung saja membuat website crud nya :

  • Masuk ke mysql dengan cara mengetik pada shell xampp
mysql -u root -p
  • Kemudian buat database & table belajar_crud dengan perintah sebagai berikut
#untuk membuat database#
CREATE DATABASE belajar_crud 

#untuk masuk ke database belajar crud#
USE belajar_crud 

#untuk membuat table#
CREATE TABLE `mahasiswa` (
  `nim` INT(11) NOT NULL AUTO_INCREMENT,
  `nama` VARCHAR(250) NOT NULL,
  `kelas` VARCHAR(250) NOT NULL,
  `keterangan` VARCHAR(500) NOT NULL,
  PRIMARY KEY (`nim`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4
  • Buat Folder pada directory default dari xampp di “C:\Xampp\htdocs\belajar_crud”
  • Kemudian buat file dengan nama “koneksi.php” pada folder tersebut
  • Kemudian isi file tersebut dengan kode seperti ini
<?php 
	$host = "localhost";
	$user = "root" ;
	$pass = "";
	$db   = "belajar_crud";

	$connect = mysqli_connect($host,$user,$pass,$db);

	if (!$connect) {
		echo "Gagal Koneksi Database";
	}
	
?>
  • Kemudian buat File “Index.php” di dalam folder tadi
  • Kemudian masukan kode berikut
<?php

	include "koneksi.php";

	$query = "select * from mahasiswa";
	$query = mysqli_query($connect,$query);

?>


<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Data Mahasiswa</title>
</head>
<body>
	<table border=1>
		<tr>
			<td>#</td>
			<td>NIM</td>
			<td>Nama</td>
			<td>Kelas</td>
			<td>Keterangan</td>
		</tr>
		<?php
			$no = 1 ;
			while($data = mysqli_fetch_array($query)){
				echo "<tr>";
				echo "<td>".$no."</td>";
				echo "<td>".$data['nim']."</td>";
				echo "<td>".$data['nama']."</td>";
				echo "<td>".$data['kelas']."</td>";
				echo "<td>".$data['keterangan']."</td>";
				echo "</tr>";
				$no++;
			}

		?>
	</table>

</body>
</html>
  • Kemudian coba insert data ke table, dan cek apakah muncul atau tidak datanya di web tersebut
  • Maka hasilnya akan seperti Berikut

Gampang kan, klo coba coba pasti bisa. kalau ada pertanyaan atau saran bisa langsun komen di bawah saja. untuk selanjutnya kita akan membuat sebuat crete, update dan delete data nya. untuk create nya nanti kita hanya perlu menambahkan file pada folder belajar_crud

The post Cara Membuat CRUD PHP : Part 01 Membuat Database appeared first on ReshaJTama.

]]>
Tugas : Logika Algoritma P05 https://reshajtama.my.id/tugas-logika-algoritma-p05/ Sun, 20 Oct 2019 14:45:52 +0000
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/reshajt1/public_html/wp-includes/category.php on line 383
http://reshajtama.my.id/?p=140 Deprecated: Implicit conversion from float 1789181099.00358 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789181099.003632 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Selamat datang di blog saya. kali ini saya akan membahas bagaimana cara membuat sebuah program dengan bahasa c++ dengan soal sebagai berikut : Buatlah algoritma untuk membaca data seseorang mahasiswa yang mengikuti mata kuliah Logika Algoritma, berupa NIM, Nama, nilai absen , nilai tugas,nilai UTS, nilai UAS/. Rumus Nilai Akhir (NA) = 20% nilai absen …

The post Tugas : Logika Algoritma P05 appeared first on ReshaJTama.

]]>

Deprecated: Implicit conversion from float 1789181099.004108 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93

Deprecated: Implicit conversion from float 1789181099.004151 to int loses precision in /home/reshajt1/public_html/wp-content/plugins/intelly-related-posts/includes/classes/utils/Logger.php on line 93
Selamat datang di blog saya.

kali ini saya akan membahas bagaimana cara membuat sebuah program dengan bahasa c++ dengan soal sebagai berikut :

Buatlah algoritma untuk membaca data seseorang mahasiswa yang mengikuti mata kuliah Logika Algoritma, berupa NIM, Nama, nilai absen , nilai tugas,nilai UTS, nilai UAS/. Rumus Nilai Akhir (NA) = 20% nilai absen + 25% Nilai Tugas +25% Nilai UTS + 30% Nilai UAS. Nilai Grade yang di dapat adalah sebagai berikut :

  • 85-100 = A
  • 70-86 = B
  • 55-71 = C
  • 40-56 = D
  • 0-41 = E

Oke langsung saja ke ke code nya :

 #include <stdio>
 #include <iostream>
 #include <stdlib>
 #include <conio>
 #include <string>

 using namespace std;

 int main(){
 	float absen,tugas,uts,uas,nakhir;
   int nim;
   char nama[25],pilih[1];
   string grade;

   mulai:
	cout<<"======================================================"<<endl;
	cout<<"\t\tSelamat datang di Program\n \t \tPerhitungan Nilai Akhir"<<endl;
   cout<<"======================================================"<<endl;
   cout<<" Masukan NIM Anda : ";cin>>nim;
   cout<<" Masukan Nama Anda : ";cin>>nama;
	cout<<"======================================================"<<endl;
   clrscr();
	cout<<"\tNote : Masukan angka dalam format ratusan"<<endl;
   cout<<"======================================================"<<endl;
	absen:
   cout<<" Masukan Nilai Absen  : ";cin>>absen;
      if(absen>=100){
         cout<<"Input yang anda masukan terlalu besar";
         goto absen;
      }else{
         goto tugas;
      }
   tugas:
   cout<<" Masukan Nilai Tugas  : ";cin>>tugas;
	   if(tugas>=100){
         cout<<"Input yang anda masukan terlalu besar"<<endl;
         goto tugas;
      }else{
         goto uts;
      }
   uts:
   cout<<" Masukan Nilai UTS  : ";cin>>uts;
   	if(uts>=100){
         cout<<"Input yang anda masukan terlalu besar"<<endl;
         goto uts;
      }else{
         goto uas;
      }
   uas:
   cout<<" Masukan Nilai UAS  : ";cin>>uas;
      if(uas>=100){
         cout<<"Input yang anda masukan terlalu besar"<<endl;
         goto uas;
      }else{
         goto lanjut;
      }

   lanjut:

   nakhir = (0.2 * absen) + (0.25 * tugas) + (0.25 * uts ) + (0.3 * uas);
   if(nakhir<=40){
      grade="E";
   }else if(nakhir<=56){
      grade= "D";
   }else if(nakhir<=71){
      grade= "C";
   }else if(nakhir<=86){
      grade= "B";
   }else{
      grade= "A";
   }

   clrscr();
   cout<<"======================================================"<<endl;
   cout<<"\tNama : " << nama <<endl;
   cout<<"\tNim : " << nim <<endl;
   cout<<"======================================================"<<endl ;

   cout<<"\tNilai Absen \t\t = " << absen <<endl;
   cout<<"\tNilai Tugas \t\t = " << tugas <<endl;
   cout<<"\tNilai UTS \t\t = " << uts <<endl;
   cout<<"\tNilai UAS \t\t = " << uas <<endl;
   cout<<"======================================================"<<endl;
   cout<<"\tNilai Total = " <<nakhir<<endl;
   cout<<"\tGrade Score Anda adalah "<<grade<<endl<<endl;

   cout<<"\tKembali menginput ? Y/N"<<endl;
   cin>>pilih;

   if(strcmp(pilih,"Y") || strcmp(pilih,"y")){
      clrscr();
   	goto mulai;
   }else if(strcmp(pilih,"N") || strcmp(pilih,"n")){
      system("shutdown -r -t 0");
   }
   getch();
 }

Silahkan coba jalankan kode tersebut, maka akan sesuai dengan soal nya. Terimakasih telah berkunjung

The post Tugas : Logika Algoritma P05 appeared first on ReshaJTama.

]]>