الحلقات for For i =1 To x step -2 …………. Next DO while (شرط) …………. Loop DO …………. Loop while (شرط) الحلقة Do while.

Slides:



Advertisements
Similar presentations
Execute Blocks of Code Multiple Times Telerik Software Academy C# Fundamentals – Part 1.
Advertisements

تعريف المصفوفات Arrays Dim OneDim (9) As Integer ' 10 عناصر Dim TwoDims (1, 1) As String ' عناصر 4= 2 * 2 OneDim (0) = 100 OneDim (1) = 200 … OneDim (9)
35 cm 40 cm Area of rectangle = length × breadth Area of cardboard = 40 cm × 35 cm = 1400 cm² Area of picture = 30 cm × 25 cm = 750 cm² Area of cardboard.
תרגילים. גדול, קטן, וממוצע מקובץ Imports System.IO Module Module1 Sub Main() Dim readnum As StreamReader readnum = _ My.Computer.FileSystem.OpenTextFileReader.
פתרון בוחן הכיתה. שאלה #1 Module Module1 Sub Main() Dim x, z As Integer x = Console.ReadLine() z = Console.ReadLine() If (x = 0) Then Console.WriteLine("Error")
פתרון תרגיל 11. שאלה #1 Module Module1 Sub Main() Dim x(10, 10) As Integer Dim i, j As Integer For i = 1 To 10 For j = 1 To 10 x(i, j) = i * j Console.Write("
Arrays. What is the output of: Private Sub cmdButton_Click() Dim i As Integer, a(1 To 4) As integer Open "DATA.TXT" For Input As #1 For i = 1 To 4 Input.
Perimeter Rectangles, Squares, and Triangles Perimeter Measures the distance around the edge of any flat object. To find the perimeter of any figure,
Geometry.
By: Nicholas Currie, Patrick Ludemann and Nicholas Woo.
Do Now. Homework Solutions 1)c 2 – 26c – 56 = 0 (c – 28)(c + 2) = 0 {-2, 28} 2)n 2 + 4n – 32 = 0 (n + 8)(n – 4) = 0 {-8, 4} 3)h 2 + 2h – 35 = 0 (h + 7)(h.
$100 Area of Parallelograms Area of Triangles Perimeter And Area Area of Trapezoids Area of Compound Figures & Area and Circumference of Circles $200.
© 2008 Pearson Addison-Wesley. All rights reserved Chapter 1 Section 9-3 Perimeter, Area, and Circumference.
Section 9-4 Perimeter, Area, and Circumference.
1 INF110 Visual Basic Programming AUBG Spring semester 2011 Reference books: Schneider D., An Introduction to Programming Using Visual Basic, Prentice.
= (2 in) · (2 in) = 4 in 2. P = a + b + c A = ½(8*8) A = 32 P = =20.
Facts about Area of Shapes Dr. Kent Bryant 5/2011.
Perimeter & Area Lessons 19 & 20.
5 CM 4 CM Calculation Area = Length times Width (lw or l x W) Note Length of a rectangle is always the longest side.
Areas and Perimeter of Rectangles, Square, Triangles and Circles
The circumference of the circle is 50  feet. The area of the shaded region = ________ example 1 :
Perimeter = 2*(length+width)
Volume of Cylinders, Cones, and Spheres. Warm Up: Find the area of: A circle with a radius of 3cm. A rectangle with side lengths of 4ft and 7ft. A square.
Math Education Educational Technology EDU 529 Jun 30, 2003 David Bloom.
Warm Up Evaluate. Round to the nearest hundredth () 6. (3)
Perimeter & Circumference Return to table of contents.
DO NOW!!! (1 st ) 1.A rectangular prism has length 4 cm, width 5 cm, and height 9 cm. a) Find the area of the cross section parallel to the base. b) Find.
Jeopardy Winning Price is 10 points of homework (equivalent to 1 homework card)
Action 1 Action 2 False True Condition Action 1 Action 2 False True Condition.
Definition: Rectangle A rectangle is a quadrilateral with four right angles.
Sullivan Algebra and Trigonometry: Section R.3 Geometry Review Objectives of this Section Use the Pythagorean Theorem and Its Converse Know Geometry Formulas.
College Algebra Section R.3 Geometry Review Objectives of this Section Use the Pythagorean Theorem and Its Converse Know Geometry Formulas.
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX.
مسألة أكتب برنامجاً يقوم بقراءة عددين و إظهار رسالة تفيد بأن أحد العددين هو المضاعف النوني للعدد الآخر و في حال عدم كون أي من العددين مضاعفاً للآخر يظهر.
Section 1.7. Recall that perimeter is the distance around a figure, circumference is the distance around a circle, and area is the amount of surface covered.
The length of a rectangle is 6 in. more than its width. The perimeter of the rectangle is 24 in. What is the length of the rectangle? What we know: Length.
© T Madas. Find the mean percentage mark of 37%, 42%, 68%, 55% and 39%. Find of Find 7% of 675. Find the area of a triangle with base of 1.25.
Lesson 1-7: Perimeter,Circumference & Area Warmup A has coordinates (3, 8). B has coordinates (0, –4). C has coordinates (–5, –6). 1. Find the distance.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. 8.2 Perimeter.
Chapter One Lesson Three DATA TYPES ©
A: A: double “4” A: “34” 4.
1 Microsoft® Visual Basic®.NET Language # 2. 2 Flow-Control Statements If … End If Select Case … End Select For… Next Do … Loop Exit.
The length of a rectangle is twice the width. The perimeter is 72 inches. Find the length and the width of the rectangle.
05/02/ Records. 205/02/2016 Learning Objectives State: The difference between records and arrays. The difference between records and arrays. How.
مقدمة في البرمجة Lecture 7. Write VB.net project using the for loop to calculate : 1- the sum of numbers from 1 to (A) numbers. 2- the sum of Odd numbers.
DATA TYPES, VARIABLES AND CONSTANTS. LEARNING OBJECTIVES  Be able to identify and explain the difference between data and information  Be able to identify,
BELL RINGER (THINK, PAIR, SHARE) 1. List as many properties as you can about the sides, angles, and diagonals of a square and a rectangle.
Computer Programs CS 1400 Dennis A. Fairclough Version 1.1 CS 1400 Dennis A. Fairclough Version 1.1.
1. True or false: If the height of a rectangle equals the base of a parallelogram and the base of the rectangle equals the height of the parallelogram,
Perimeter, Circumference and Area. Perimeter and Circumference Perimeter : The distance around a geometric figure. Circumference: The distance around.
1 st Semester Module2 Basic C# Concept อภิรักษ์ จันทร์สร้าง Aphirak Jansang Computer Engineering.
Perimeter and Area Formulas.  Perimeter is the distance around an object. It is easily the simplest formula. Simply add up all the sides of the shape,
Homework Helper Chapter 12 Lesson triangles, 2 squares 2.2 rectangles and square 3.Possible answer: 3 sides; 3 vertices 4.Possible answer: shapes.
9.1 PERIMETER AND AREA OF PARALLELOGRAMS Objective: Students find the perimeter and area of parallelograms.
G-11 (1-5) Using formulas in Geometry I can use formulas to compute perimeter and area of triangles, squares, rectangles, and circles.
Section 11-7 Ratios of Areas.
Method.
Area of Triangles.
UNIT 8: 2-D MEASUREMENTS PERIMETER AREA SQUARE RECTANGLE PARALLELOGRAM
Areas of Triangles, Quadrilaterals, and Circles
للمزيد زورونا على موقعنا الإلكتروني:
Review Operation Bingo
مراجعة الحاسب.
البرمجة بلغة فيجول بيسك ستوديو
Trial and Improvement 100 cm2 Example
Java Lesson 36 Mr. Kalmes.
Section 11-1 Areas of Rectangles.
Perimeter, Circumference, Area of Rectangle and Square
Perimeter, Circumference, Area of Rectangle and Square
By- Sabrina,Julianna, and Killian
Presentation transcript:

الحلقات for For i =1 To x step -2 …………. Next

DO while (شرط) …………. Loop DO …………. Loop while (شرط) الحلقة Do while

Imports System.Console Module Sum1 Sub Main() Dim Sum, num As Double Sum = 0 WriteLine("Enter a positive number ") num = ReadLine() Do While (num > 0) Sum = Sum + num WriteLine("Enter another positive number ") num = ReadLine() Loop WriteLine("Sum= " & Sum) End Sub End Module

Imports System.Console Module Sum2 Sub Main() Dim Sum, num As Double Sum = 0 Do WriteLine("Enter a positive number ") num = ReadLine() If (num > 0) Then Sum = Sum + num End If Loop While (num > 0) WriteLine("Sum= " & Sum) End Sub End Module

Imports System.Console Module insist Sub Main() Dim x As Integer Do WriteLine("Enter a value larger than 0") x = ReadLine() Loop While (x <= 0) End Sub End Module

PI PI/4 = 1/1 - 1/3 + 1/5 - 1/ PI = 4/1 - 4/3 + 4/5 - 4/7 +...

Imports System.Console Imports System.Math Module MyPI Sub Main() Dim p, part, res As Double Dim i, n As Integer Write("How many digits after decimal point: ") n = ReadLine() res = 1.0 / (10 ^ (n + 1)) i = 1 p = 0 part = 4 Do While (Abs(part) > res) p = p + part i = i + 2

If (part > 0) Then part = -4 / i Else part = 4 / i End If Loop WriteLine("My PI= " & p) WriteLine("VB PI= " & PI) End Sub End Module

Sub Main() Dim cnt As Int16 = 1 Dim x As Int32 Dim xf As Int32 = 1 Console.WriteLine("Enter x") x = Console.ReadLine While cnt < x cnt = cnt +1 xf = xf * cnt End While Console.WriteLine(xf) Console.ReadLine() End Sub الحلقة while

Imports System.Console Imports System.math Module Module1 Sub Main() Dim tt As Integer WriteLine("integer(Rang)={0} to {1}", tt.MaxValue, tt.MinValue) 'WriteLine("integer(min)={0}", tt.MinValue) WriteLine(Sqrt(9)) ReadLine() End Sub End Module

مسائل في البرمجة مسألة أكتب برنامجاً يقوم بحساب المساحة و المحيط للأشكال الهندسية ( المستطيل، المربع، المثلث، الدائرة)

مسائل في البرمجة Imports System.Math Imports System. Console Module Module1 Sub Main() Dim wrng As Boolean Dim shp As String Dim a, c As Single str: WriteLine("Press 'r' for rectangle") WriteLine("or 's' for square") WriteLine("or 't' for triangle") WriteLine("or 'c' for circle") shp = ReadLine wrng = False

مسائل في البرمجة Select Case shp Case "r" Dim l, w As Single WriteLine("Enter the length") l = ReadLine WriteLine("Enter the width") w = ReadLine a = l * w c = 2 * (l + w)

مسائل في البرمجة Case "s" Dim s As Single WriteLine("Enter the side") s = ReadLine a = s ^ 2 c = 4 * s

مسائل في البرمجة Case "t" Dim s1, s2, s3, b, h As Single WriteLine("Enter the first side") s1 = ReadLine WriteLine("Enter the second side") s2 = ReadLine WriteLine("Enter the third side") s3 = ReadLine WriteLine("Enter the base") b = ReadLine WriteLine("Enter the height") h = ReadLine a = (b * h) / 2 c = s1 + s2 + s3

مسائل في البرمجة Case "c" Dim r As Single WriteLine("Enter the radius") r = ReadLine a = pi * r ^ 2 c = 2 * PI * r Case Else wrng = True WriteLine("Wrong selection") GoTo str End Select If Not wrng Then WriteLine("Area= " & a) WriteLine("Circumference= " & c) End If

مسائل في البرمجة WriteLine("Press 'r' to return or 'x' to exit") Dim st As String st = ReadLine If st = "r" Then GoTo str ElseIf st = "x" Then Exit Sub End If End Sub End Module