Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

TUTORIAL PROGRAMMING WITH C++ LANGUAGE FOR FRESHMAN EASY, Assignments of Information Technology

A tutorial for beginners in C++ programming language. It covers basic concepts such as outputting text, using endl and , commenting, counting words, addition, inputting numbers, and using cin and cout. The tutorial is specifically designed for first-semester students in Elliza (Teknik Informatika) *2. sample codes and their corresponding outputs to help students understand the concepts better.

Typology: Assignments

2020/2021

Available from 01/17/2023

elisaafebr
elisaafebr 🇮🇩

5 documents

1 / 3

Toggle sidebar

Related documents


Partial preview of the text

Download TUTORIAL PROGRAMMING WITH C++ LANGUAGE FOR FRESHMAN EASY and more Assignments Information Technology in PDF only on Docsity! ELLIZA (TEKNIK INFORMATIKA) *2 TUTORIAL BAHASA C++ PEMULA UNTUK MAHASISWA SEMESTER 1 1. OUTPUT KALIMAT #include <iostream> using namespace std; int main (){ cout << " Elisa is a freshman at untirta"; return 0; } 2. ENTER BISA PAKE <<endl (di luar tanda kutip) atau “\n” (di dalam tanda kutip) cout << "Elisa is a freshman at untirta" << endl; cout << "Semester 3 and 4 is a sophomore \n"; cout << "Semester 5 and 6 is a junior"; 3. BUAT GAK INPUT KALIMAT PAKAI /* */ atau // // cout << "Elisa is a freshman at untirta"; /* cout << "Semester 7 and 8 is a senior */; cout << "Elisa"; OUTPUTNYA NANTI CUMA ELISA AJA 4. HITUNG JUMLAH KATA int elisa = 5; cout << elisa; 5. PENJUMLAHAN #int elisa = 5; int rara = 4; int sum = elisa + rara; cout << sum; 6. INPUT 2 ANGKA, jadi angka satu ada di program, satu lagi input di hasil #include <iostream> using namespace std; int main() { int a; cout << "3 \n"; cin >> a; cout << a; return 0; } 7. PENULISAN ANGKA #include <iostream> using namespace std; int main() {     int a, b;     cout << "1 \n";     cin >> a;     cout << "2 \n";     cin >> b;     cout << a << "3" << b;     return 0; } OUTPUTNYA: 1 2 430 (jadi angka 4 sama 3 nya kebalik) 8. PENGGUNAAN CIN COUT #include <iostream> using namespace std; int main (){ int a, b; int sum; cout << " first number = " << endl; cin >> a; cout << " second number = " << endl; cin >> b; sum = a + b; cout << "sum is = " << sum << endl; return 0; } OUTPUT first number = 100 second number = 200 sum is = 300 9. CIN COUT SIMPLE include <iostream>
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved