(’Selangor’‚’Johor’); strMonth : array[1..6] of string = (’January’‚’February’‚’March’‚’April’‚’May’‚’June’);type rainfallRec = record state ‚ city : String; amountRain : array[1..6] of Integer; end;procedure getRainfall(var rainfall : array of rainfallRec);var i‚j : integer; intState : Integer;begin for i := 1 to 6 do begin write(’Enter district: ’); readln(rainfall[i].city); writeln(’Select state :’); writeln(’1) Selangor’); writeln(’2)
Premium Programming language
structures Describe the different primitive data types: Boolean‚ character‚ string‚ integer and real 3 Describe the storage requirements for each data type 3 Describe the manipulation of records and arrays up to two dimensions 8 Identify and justify the correct data structure (record or array) for a given situation 10 Describe the different primitive data types (Boolean‚ character‚ string‚ integer and real). Describe the storage requirements for each data type. Introduction to Data
Premium Programming language Object-oriented programming Computer
one of these data types: NULL — The value is a NULL value INTEGER — a signed integer REAL — a floating point value TEXT — a text string BLOB — a blob of data sqlite> CREATE TABLE Testing(Id INTEGER); sqlite> .schema Testing CREATE TABLE Testing(Id INTEGER); We create a simple Testing table with the CREATE TABLE statement. The .schema command shows the formal definition of the table. sqlite> CREATE TABLE Testing(Id INTEGER); Error: table Testing already exists If we try to create
Premium SQL
Practical 1 Aim: - WAP to perform arithmetic operation using command buttons. (Declare variables globally). Design:- Source code :- Path :- F:\Program Files\Microsoft Visual Studio\COMMON\IDE\IDE ‘Initialize variable global Dim a‚ b‚ c As Integer ‘event for clear content Private Sub Command1_Click() ‘clear text box Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub ‘option for addition Private Sub Option1_Click() a = Val(Text1.Text) b = Val(Text2.Text) ‘Perform operation c = a + b Text3
Premium Source code Prime number
main module from Lab 5.2. Notice that if the user enters a capital ‘Y’ the program will end since the while loop only checks for a lower case ‘y’. Module main () //Step 1: Declare variables below Declare Integer totalBottles = 0 Declare Integer counter = 1 Declare Integer todayBottles = 0 Declare Real totalPayout Declare String keepGoing = ‘y’ //Step 3: Loop to run program again While keepGoing == ‘y’ //Step 2: Call functions getBottles(totalBottles‚ todayBottles‚ counter)
Premium Ring Real number Natural number
Introduction to the C Programming Language Science & Technology Support High Performance Computing Ohio Supercomputer Center 1224 Kinnear Road Columbus‚ OH 43212-1163 Table of Contents • • • • • • • • • Introduction C Program Structure Variables‚ Expressions‚ & Operators Input and Output Program Looping Decision Making Statements Array Variables Strings Math Library Functions • • • • • • • • • User-defined Functions Formatted Input and Output Pointers
Premium
Pythagorean triples Math Bonus A Pythagorean triple consists of three positive integers a ‚ b ‚ and c ‚ such 2 2 2 that a + b = c . Such a triple is commonly written ( a ‚ b ‚ c )‚ and a wellknown example is (3‚ 4‚ 5). If ( a ‚ b ‚ c ) is a Pythagorean triple‚ then so is ( ka ‚ kb ‚ kc ) for any positive integer k . A primitive Pythagorean triple is one in which a ‚ b and c are coprime . A right triangle whose sides form a
Premium Pythagorean theorem Triangle Prime number
6. List last number as largest 7. List results Input: Prompt for Numbers (integer: numbers 1-100) Output: Smallest Number (integer: number 1-100) Largest Number (integer: number 1-100) Design Main Module Declare Employee Names [100] as string Declare Salaries [100] as string Declare Average as real Declare K as integer Declare Sum as integer Write‚ “The Average Salary Computation Program.” Write‚ “This program enables the user to
Premium
Open the excel file which is password protected and goto Macro’s (I am using Office 2007 so the menu’s maybe different View >> Macros). Click on "Record Macro >> OK" and then click on "Stop Recording" from the same menu. Now goto "View Macros"‚ you will find a Macro with a default name E.g. Macro1 - Select the macro name and click on Edit. Now a Visual Basic Editor opens up. Re-place the default code and Paste the below code. Sub Macro1() ’ ’ Breaks worksheet and workbook structure passwords
Premium
Comments Integer Constants • Integer constants can be written in decimal‚ hexadecimal‚ octal or binary‚ by adding a radix (or number base) suffix to the end . • Radix Suffices: –d decimal (the default) –h hexadecimal – q or o octal –b binary Examples of Integer Constants • • • • • • • • 26 1Ah 1101b 36q 2Bh 42Q 36D 47d Decimal Hexadecimal Binary Octal Hexadecimal Octal Decimal Decimal Integer Expressions • An integer expressions is a mathematical expressions involving integer values and
Premium Source code Data type Real number