MTM216 GÖRSEL PROGRAMLAMA

Slides:



Advertisements
Similar presentations
Lecture Computer Science I - Martin Hardwick Strings #include using namespace std; int main () { string word; cout
Advertisements

Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
C++ crash course Class 10 practice problems. Pointers The following function is trying to swap the contents of two variables. Why isnt it working? void.
For(int i = 1; i
Introduction to Computer Science Robert Sedgewick and Kevin Wayne Recursive Factorial Demo pubic class Factorial {
Methods. Read two numbers, price and paid (via JOptiondialog) Calculate change; s = JOptionPane.showInputDialog("Enter price”); Double price = Double.parseDouble(s);
STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
What is output line of the following C++ code? Please trace int i = 1, QP; DATA: 4, B, 3, A double credit, totCredit=0.0; double num = 0.0; string LG;
Hand Trace and Output for: int digit = 0; int number = 1423; do { digit = number % 10; System.out.println(digit); number = number / 10; } while (number.
Introduction to Data Structures CMPE231 Spring 2012 Assoc. Prof. Alexander Chefranov 1.
Divisor máximo de dois inteiros. unsigned int gcd(unsigned int A, unsigned int B) { if (B > A) return gcd(B,A); else if (B==0) return A; else return gcd(B,A%B);}
Practical Programming COMP153-08S Lecture: Repetition Continued.
Practical Programming COMP153-08S Lecture 6: Making Decisions Part II.
CS 240: Data Structures Binary Representations. Binary Binary is a numerical system that is used to represent numeric values. Binary is a numerical system.
CIT 381 Data Types - data types - create table statement - constraints.
Basic SQL types String –Char(n): fixed length. Padded –Varchar(n): variable length Number –Integer: 32 bit –Decimal(5,2): –Real, Double: 32 bit,
Labs 6 and 7. Adding “Controls” to a Document Properties.
Public static void main( String [] args ){ getBinaryNumberFromUser(); //asks the user to type a binary number while( notDone() ){ int binary_digit = getNextDigit();
The char Data Type A char is a one byte integer type typically used for storing characters. Example: char oneLetter = ’D’; We enclose the character in.
MULTIPLE ALTERNATIVES IF… THEN… ELSEIF SELECT CASE.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Practical Programming COMP153-06S Lecture 3: Making Decisions.
Using Recursion to Convert Number to Other Number Bases Data Structures in Java with JUnit ©Rick Mercer.
Ajmer Singh PGT(IP) Programming Fundamentals. Ajmer Singh PGT(IP) Java Character Set Character set is a set of valid characters that a language can recognize.
Created by Alia Al-Abdulkarim 2008 Visual Basic Vs. Java.
2 tenths - 1 tenth = 1 tenth = tenths - 3 tenths =
Rounding (Decimal Places) Round each number to the given number of decimal places.
A: A: double “4” A: “34” 4.
Stringler, Arrayler, Dosyalar. Diziler SINGLE int[] numbers; int[] numbers = new int[5]; int[] numbers = new int[5] {1, 2, 3, 4, 5}; string[] names =
Values, Types, and Variables. Values Data Information Numbers Text Pretty much anything.
BIL528 – Bilgisayar Programlama II Methods 1. Contents Methods 2.
1 Advanced Programming Examples Output. Show the exact output produced by the following code segment. char[,] pic = new char[6,6]; for (int i = 0; i
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Calculator Program Explained by Arafa Hamed. First Designing The Interface Ask yourself how many places are there that will be used to input numbers?
Fractions and Decimal Fractions Fractions Decimal Fractions
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Practical Programming COMP153-08A Lecture 4:Strings & Formatting.
1 Advanced Programming Examples. using System; class Test { static void Main( string[] args ) { int a = 7; int b = 3; int c = 5; int d = 9; Console.WriteLine(!(d.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
Computer Programming ||
Sum of natural numbers class SumOfNaturalNumbers {
CS 211 Object Oriented Programming
Command line arguments
C# Introduction ISYS 350.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Service-Oriented Computing -- Service Provider and Application Builder
More Examples of argc and argv
Introduction to Programming and the C Language
Review Operation Bingo
Decimals > Fractions > Percentages
DSCN4685MEq.jpg DateTime :10:31 11:47:00
TO COMPLETE THE FOLLOWING:
Data Types.
Dividing Decimals.
Multiplying Decimals 3-6 & 3-7.
Exercise Design a Design Class for: Vehicle (for a car dealership)
CS 180 Assignment 6 Arrays.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Objective - To multiply decimals.
CS148 Introduction to Programming II
C# Revision Cards Data types
Programming Languages Dan Grossman 2013
Character Arrays char string1[] = “first”;
Main() { int fact; fact = Factorial(4); } main fact.
Addition & Subtraction Addition & Subtraction
Final Revision sheet- term2
Recursive example 1 double power(double x, int n) // post: returns x^n
Final Revision sheet- term2
P(1) = P(2) = P(3) = P(4) = P(5) = 0.166
C# Language & .NET Platform 12th Lecture
Presentation transcript:

MTM216 GÖRSEL PROGRAMLAMA Temel Komutlar

decimal veri; veri = Convert.ToDecimal(textBox1.Text); label1.Text = "Sonuc = " + veri.ToString(); string s; s = textBox1.Text; label1.Text = s; label2.Text = "Karabük Üniversitesi"; Birinci Yöntem textBox1.Text = "";   İkinci Yöntem textBox1.Text = null;

DateTime tarih_deger; tarih_deger = Convert.ToDateTime(tarih); Birinci Yöntem string tarih; tarih = textBox1.Text; DateTime tarih_deger; tarih_deger = Convert.ToDateTime(tarih); label2.Text = tarih_deger.ToString(); İkinci Yöntem string tarih; tarih = textBox1.Text; DateTime tarih_deger; tarih_deger = DateTime.Parse(tarih); label2.Text = tarih_deger.ToString(); Birinci Yöntem Form2 Yeni = new Form2(); Yeni.Show();   İkinci Yöntem Form3 Yeni = new Form3(); Yeni.ShowDialog();

int sayi_1=Convert.ToInt16(textBox1.Text); int toplam=sayi_1+sayi_2; textBox3.Text = toplam.ToString(); int sayi; label2.Text = ""; sayi = Convert.ToInt32(textBox1.Text); if (sayi >= 100) { return;//olmasada olur } else label2.Text = sayi.ToString(); decimal sayı; sayı = Convert.ToDecimal(textBox1.Text); string sonuc; sonuc = sayı.ToString("#,###.00 TL"); textBox2.Text = sonuc;