Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer

Similar documents
An InputBox( ) function will display an input Box window where the user can enter a value or a text. The format is

Programming with visual Basic:

IS 320 Spring 96 Page 1 Exam 1. Please use your own paper to answer the following questions. Point values are shown in parentheses.

IDENTIFYING UNIQUE VALUES IN AN ARRAY OR RANGE (VBA)

2-26 Learn Visual Basic 6.0

Visual Basic Visual Basic

Remainder Cordial Labeling of Graphs

LAMPIRAN. Universitas Sumatera Utara

ADVANCED ALGORITHMS TABLE OF CONTENTS

Function: function procedures and sub procedures share the same characteristics, with

1 Elementary number theory

An overview about DroidBasic For Android

Lecture Using ListBox and ComboBox Controls In Visual Basic 6: list box

Unit 2: Accentuate the Negative Name:

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

Start Visual Basic. Session 1. The User Interface Form (I/II) The Visual Basic Programming Environment. The Tool Box (I/II)

LAMPIRAN FORM 1 Universitas Sumatera Universitas Utara

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

TABLE OF CONTENTS ADVANCED VISUAL BASIC

IMPORTANCE OF NUMBER THEORY IN CRYPTOGRAPHY

Sample Paper 2010 Class XII Subject Informatic Practices

Visual Basic 6 Lecture 7. The List Box:

Monte Carlo Integration

PAijpam.eu SECURE SCHEMES FOR SECRET SHARING AND KEY DISTRIBUTION USING PELL S EQUATION P. Muralikrishna 1, S. Srinivasan 2, N. Chandramowliswaran 3

MgtOp 470 Business Modeling with Spreadsheets Sample Midterm Exam. 1. Spreadsheets are known as the of business analysis.

Fundamentals of Computer Science Laboratory 2 Sequential programs

EMPLOYEE PAYROLL SYSTEM

IS 320 A/B Winter 1998 Page 1 Exam 1

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Outline. Midterm Review. Using Excel. Midterm Review: Excel Basics. Using VBA. Sample Exam Question. Midterm Review April 4, 2014

Relational Operators. > greater than < less than >= greater than or equal to <= less than or equal to <> not equal to = equal to

Please answer questions in the space provided. Question point values are shown in parentheses.

Unit 3: Multiplication and Division Reference Guide pages x 7 = 392 factors: 56, 7 product 392

ต วอย างการสร างฟอร ม เมน การใช งาน


Discrete Mathematics Lecture 4. Harper Langston New York University

5 When a program calls a function, in which type of data structure is memory allocated for the variables in that function?

PROGRAM 1: SIMPLE CALCULATOR

VBScript: Math Functions

HELP - VB TIPS. ANIMATE AN IMAGE BOX Insert a module. In this module, create a global variable: Global x

Angel International School - Manipay 1 st Term Examination November, 2015

Ch 3.4 The Integers and Division

Information Hiding In Images Using Randomly Selected Points

3. Can every Do-Loop loop be written as a For-Next loop? Why or why not? 4. Name two types of files that can be opened and used in a VB program.

x= suppose we want to calculate these large values 1) x= ) x= ) x=3 100 * ) x= ) 7) x=100!

COMPUTER SCIENCE SECTION A

Kurose & Ross, Chapters (5 th ed.)

Agenda. Arrays 01/12/2009 INTRODUCTION TO VBA PROGRAMMING. Arrays Matrices.

Unit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types

Universitas Sumatera Utara

USING VB TO GENERATE PSEUDO-RANDOM NUMBERS... 25

Basic Assembly Instructions

Outline. What Digit? => Number System. Decimal (base 10) Significant Digits. Lect 03 Number System, Gates, Boolean Algebra. CS221: Digital Design

Year 12 : Visual Basic Tutorial.

L A M P I R A N. Universitas Sumatera Utara

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

CGF Lecture 2 Numbers

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

S.2 Computer Literacy Question-Answer Book

PROGRAMMING IN HASKELL. Chapter 5 - List Comprehensions

Course Learning Outcomes for Unit I. Reading Assignment. Unit Lesson. UNIT I STUDY GUIDE Number Theory and the Real Number System

08 NSBasic Moving Target Page = 1 = 13 October 2015

File Organization and Management

50 MATHCOUNTS LECTURES (6) OPERATIONS WITH DECIMALS

Credit Cards. Validating Credit Cards. Answers

PROJECT ELECTRONIC CONTROL GAS INJECTION SYSTEM

The Control Properties

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

Fast Food Store Group Boxes and Other User Controls

DroidBasic Syntax Contents

Sub Programs. To Solve a Problem, First Make It Simpler

QUIZ: Generations of computer technology. Hardware:

Variable initialization and assignment

Lookup Project. frmlookup (Name: object is a combo box, style 2); use 4 labels: 2 for phone, 2 for mail. MsgBox Function:

Appendix A1 Visual Basics for Applications (VBA)

Chapter 3. built in functions help feature elementary math functions data analysis functions random number functions computational limits

University of Massachusetts Amherst, Electrical and Computer Engineering

Analysis of Some Bistar Related MMD Graphs

LAMPIRAN A : LISTING PROGRAM

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language

AIM To analyze, design and develop code for Online Course Reservation System using Rational Rose software

Chapter Binary Representation of Numbers

LAMPIRAN LIST PROGRAM

Visual Basic ,

Visual Basic ,

Loop Structures. Loop Structures. Algorithm to record 5 TV programmes. Recall Structured Programming..3 basic control structures.

How to Do Word Problems. Study of Integers

Programming Concepts and Skills. Arrays continued and Functions

Angel International School - Manipay 1 st Term Examination November, 2015

On the computation of the n'th decimal digit of various transcendental numbers. Abstract

ECE 3120 Computer Systems Arithmetic Programming

variables programming statements

Chapter 2 Exercises and Answers

Module 1: Information Representation I -- Number Systems

Operators & Expressions

On Integer Sequences Derived from Balanced k-ary trees

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

IFA/QFN VBA Tutorial Notes prepared by Keith Wong

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

Transcription:

(9) Propose a mathematical formula to verify the authenticity of any product of the integers using a scale (9) and verified using computer. (9). Abstract This research aims to propose a mathematical formula to verify the authenticity of the product of any two numbers are correct, using a scale (9) and verify it using the computer. The research has been divided into two sections, the first section involved the theory part to derive mathematical formula and the other section was the applied part to the formula by taking some mathematical examples to ensure the validity of the proposed formula and using the program for this formula..1. ( Decimal system ) (10) 9 8 7 6 5 4 3 2 1 0 ( ). (k - 1) 0 (k) (9) 394

. Visual Basic 6 2. الجانب النظري : (Mode) a - b a, b Z a b( mode n ) Z n r b 0 a = qb + r b a : q.(remainder) r (quotient) (b a ) q.a a 1, a 2,, a n B A C = a 1 + a 2 +... + a n D = b 1 + b 2 +... + bn E = A Y = D mod 9 B X = C mod 9 W = X * Y Mod 9.B b 1, b 2,, b n : A C : B D -: E F -: A*B W = F Mod 9 (*)... (1 ).3 Visual basic 6.(1) -: (1) 4789 A 395

4 + 7 + 8 + 9 = 28 25693 B : 1 28 mod 9 2 + 5 + 6 + 9 + 3 = 25 : 7 25 mod 9 7 1 X 7 mod 9 123043777 A B 1 +2 +3 + 0 + 4 + 3 + 7 + 7+7 = 34 A B 7 34 mod 9 1 X 7 mod 9 = 34 mod9 (1) : (*). " 6 " (1999 ) - : 396

(2) 98853 A 17698 B.6 33 mod 9 397

6 33 mod 9.4 31 mod 9.6 42 mod 9.6 6 X 4 mod 9 A B.6 X 4 mod 9 =42 mod 9 (1) : 398

-:. -:.. (1 (2 (3 399

-: " " (1998 ) -1. " " (1998 ) -2. ELGQ. " 6 " (1999 ) -3.. " " (1998 ) -4. 1 " " (2007 ) -5 -: 6- Burton, D.M (2002)" Elementary Number Theory ",5 ed Edition,Wm.C.Bromn,Dubuque, Lowa. 7-Manin Y.I and A.A. Panchishkin ( 2005) " Introduction to modern Number theory " 2 ed Edition, springer -verlage, New York. 8-Niven I. and H.S.Zuckerman (1980)" An Introduction to the theory of number ", 4 ed Edition,Johen Wiley and Sons,New York. 9- Rosen K.A (2005)" Elementary number theory and its application ",5 ed Edition, Addison Wesley,Boston, Massachusetts. 400

(1 ) Dim x As Double, y As Double, Z As Double, ST As String, I As Integer, SUM As Double, smod As Double, sy As String Sub cln() lbl1.caption = "" lbl2.caption = "" A.Caption = "" B.Caption = "" lblmul.caption = "" lblsec.caption = "" lblx.caption = "" lbly.caption = "" lbls12.caption = "" Function getsum(num As Double) As Double Dim strg As String, sm As Double, j As Double, smod2 As Double strg = Trim(Str(num)) sm = 0 For j = 1 To Len(strg) sm = sm + Val(Mid(strg, j, 1)) Next sm = FormatNumber(sm, -1) smod2 = 0 smod2 = sm Mod 9 getsum = smod2 End Function Private Sub CL_Click() End Private Sub Command1_Click() On Error GoTo 10 Call cln 401

w1.visible = False w2.visible = False w3.visible = False w4.visible = False Dim mod1 As Double, mod2 As Double, mul As Double, final As Double final = 0 mul = 0 mod1 = 0 mod2 = 0 x = InputBox(" ", " ") x = FormatNumber(x, -1) 10: If Err.Number = 13 Then ( 6 ) MsgBox " ", vbinformation, " " Exit Sub End If If x < 0 Then MsgBox " ", vbinformation, " " Exit Sub End If If Fix(x) <> x Then MsgBox " ", vbinformation, " " Exit Sub End If lblx.caption = " : " & x mod1 = getsum(x) mod1 = FormatNumber(mod1, -1) Dim sg1 As String, h1 As Long, f1 As Long sg1 = Trim(Str(x)) h1 = 0 sumx = 0 lbl1.caption = "" If Len(sg1) = 1 Then lbl1.caption = lbl1.caption & "0+" For f1 = 1 To Len(sg1) 402

h1 = h1 + 1 lbl1.caption = lbl1.caption & Mid(sg1, f1, 1) sumx = sumx + Val(Mid(sg1, f1, 1)) If h1 < Len(sg1) Then lbl1.caption = lbl1.caption & "+" Next h1 = Len(sg1) lbl1.caption = " : " & lbl1.caption lbl1.caption = lbl1.caption & " " & sumx y = InputBox(" ", " ") y = FormatNumber(y, -1) If y < 0 Then MsgBox " ", vbinformation, " " Exit Sub End If If Fix(y) <> y Then MsgBox " ", vbinformation, " " Exit Sub End If lbly.caption = " : " & y Dim sg2 As String, h2 As Double, f2 As Double sg2 = Trim(Str(y)) h2 = 0 lbl2.caption = "" If Len(sg2) = 1 Then lbl2.caption = lbl2.caption & "0+" For f2 = 1 To Len(sg2) h2 = h2 + 1 lbl2.caption = lbl2.caption & Mid(sg2, f2, 1) If h2 < Len(sg2) Then lbl2.caption = lbl2.caption & "+" sumy = sumy + Val(Mid(sg2, f2, 1)) Next h2 = Len(sg2) lbl2.caption = " : " & lbl2.caption lbl2.caption = lbl2.caption & " " & sumy 403

mod2 = getsum(y) mod2 = FormatNumber(mod2, -1) mul = mod1 * mod2 mul = FormatNumber(mul, -1) final = mul Mod 9 final = FormatNumber(final, -1) lblmul.caption =": 9 " & final Z = 0 Rem Z = x * y Z = FormatNumber(Z, -1) ST = Trim(Str(Z)) lbls12.caption = " : " & ST SUM = 0 B.Caption = "" K = 0 For I = 1 To Len(ST) K = K + 1 B.Caption = B.Caption & Mid(ST, I, 1) If K < Len(ST) Then B.Caption = B.Caption & "+" SUM = SUM + Val(Mid(ST, I, 1)) Next SUM = FormatNumber(SUM, -1) B.Caption = " " & B.Caption smod = 0 smod = SUM Mod 9 smod = FormatNumber(smod, -1) A.Caption = " : " & SUM lblsec.caption = ": 9 " & smod Rem Private Sub Command2_Click() MsgBox " ", vbinformation, " " 404

End Private Sub D_Click() Form2.Show Private Sub Form_Load() sy =" (9) " w1.visible = True w2.visible = True w3.visible = True w4.visible = True Private Sub Label1_Click() Private Sub Timer1_Timer() Static V As Byte, VV As Integer V = V + 1 If V = 15 Then V = 0 Randomize VV = Int(Rnd * V) Shape1.BorderColor = QBColor(V) Randomize VV = Int(Rnd * V) Shape2.BorderColor = QBColor(V) Randomize VV = Int(Rnd * V) Shape3.BorderColor = QBColor(V) Randomize VV = Int(Rnd * V) Shape4.BorderColor = QBColor(V) Private Sub Timer2_Timer() 405

Select Case Label3.Top Case 240 Label3.Top = Label3.Top + 50 Case 290 Label3.Top = Label3.Top - 50 End Select Select Case SEC.Top Case 1440 SEC.Top = SEC.Top + 50 Case 1490 SEC.Top = SEC.Top - 50 End Select Select Case Label5.Top Case 3240 Label5.Top = Label5.Top + 50 Case 3290 Label5.Top = Label5.Top - 50 End Select Select Case Label4.Top Case 5040 Label4.Top = Label4.Top + 50 Case 5090 Label4.Top = Label4.Top - 50 End Select Private Sub Timer3_Timer() Static f As Byte f = f + 1 If f = Len(sy) Then f = 0 Me.Caption = Left(sy, f) 406