Домашната от Console Input Output

Моите, решения на задачите от лекцията за вход и изход от конзолата без последната ( над нея още работя ).
Условията:
1. Write a program that reads 3 integer numbers from the console and prints their sum.
2. Write a program that reads the radius r of a circle and prints its perimeter and area.
3. A company has name, address, phone number, fax number, web site and manager. The manager has first name, last name, age and a phone number. Write a program that reads the information about a company and its manager and prints them on the console.
4. Write a program that reads two positive integer numbers and prints how many numbers p exist between them such that the reminder of the division by 5 is 0 (inclusive). Example: p(17,25) = 2.
5. Write a program that gets two numbers from the console and prints the greater of them. Don’t use if statements.
6. Write a program that reads the coefficients a, b and c of a quadratic equation ax2+bx+c=0 and solves it (prints its real roots).
7. Write a program that gets a number n and after that gets more n numbers and calculates and prints their sum.
8. Write a program that reads an integer number n from the console and prints all the numbers in the interval [1..n], each on a single line.
9. Write a program to print the first 100 members of the sequence of Fibonacci: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, …
10. Write a program to calculate the sum (with accuracy of 0.001): 1 + 1/2 – 1/3 + 1/4 – 1/5 + …

Ето и линк към място за свалянето на решенията ми:


Домашни от Operators, Expressions And Statements


В тази тема домашните стават с една идея по-трудно, особено последната 🙂
1. Write an expression that checks if given integer is odd or even.
2. Write a boolean expression that checks for given integer if it can be divided (without remainder) by 7 and 5 in the same time.
3. Write an expression that calculates rectangle’s area by given width and height.
4. Write an expression that checks for given integer if its third digit (right-to-left) is 7. E. g. 1732  true.
5. Write a boolean expression for finding if the bit 3 (counting from 0) of a given integer is 1 or 0.
6. Write an expression that checks if given point (x, y) is within a circle K(O, 5).
7. Write an expression that checks if given positive integer number n (n ≤ 100) is prime. E.g. 37 is prime.
8. Write an expression that calculates trapezoid’s area by given sides a and b and height h.
9. Write an expression that checks for given point (x, y) if it is within the circle K( (1,1), 3) and out of the rectangle R(top=1, left=-1, width=6, height=2).
10. Write a boolean expression that returns if the bit at position p (counting from 0) in a given integer number v has value of 1. Example: v=5; p=1  false
11. Write an expression that extracts from a given integer i the value of a given bit number b. Example: i=5; b=2  value=1.
12. We are given integer number n, value v (v=0 or 1) and a position p. Write a sequence of operators that modifies n to hold the value v at the position p from the binary representation of n.
Example: n = 5 (00000101), p=3, v=1  13 (00001101)
n = 5 (00000101), p=2, v=0  1 (00000001)
13. Write a program that exchanges bits 3, 4 and 5 with bits 24, 25 and 26 of given 32-bit unsigned integer.
14*. Write a program that exchanges bits {p, p+1, …, p+k-1) with bits {q, q+1, …, q+k-1} of given 32-bit unsigned integer.

Т.к. домашните стават все по-дълги и по-дълги реших този път да ги кача на отделен сайт, вместо да ги поствам направо тук.


HTML forms'n frames домашни

В този пост ще публикувам моите решения на задачите от лекцията за HTML формите.
Задача 1. Web Form:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>01. WebForm</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<form action="" method="post">
			<table border="1">
				<tr>
					<td><label for="lname">Last Name</label></td>
					<td colspan="3">
					<input type="text" id="lname" placeholder="Kurtev"/>
					</td>
				</tr>
				<tr>
					<td><label for="fname">First Name</label></td>
					<td colspan="3">
					<input type="text" id="fname" placeholder="Teodor"/>
					</td>
				</tr>
				<tr>
					<td><label for="addres">Addres</label></td>
					<td colspan="3">					<textarea id="addres" cols="30" rows="5" placeholder="Some addres here"></textarea></td>
				</tr>
				<tr>
					<td><label for="city">City</label></td>
					<td>
					<input type="text" id="city" placeholder="Sofia"/>
					</td>
					<td><label for="state">State</label></td>
					<td>
					<input type="text" id="state" size="3"/>
					</td>
				</tr>
				<tr>
					<td><label for="zipCode">Zip/Postal Code</label></td>
					<td colspan="3">
					<input type="text" id="zipCode" placeholder="123456"/>
					</td>
				</tr>
				<tr>
					<td><label for="country">Country</label></td>
					<td colspan="3">
					<select name="country" id="country">
						<option value="Bulgaria" selected="selected">Bulgaira</option>
						<option value="Macedonia">Macedonia</option>
						<option value="USA">USA</option>
					</select></td>
				</tr>
				<tr>
					<td><label for="phone">Phone (country code, area code, number)</label></td>
					<td colspan="3">
					<p>
						(+
						<input type="text" id="phone" size="3" placeholder="359"/>
						)
						<input type="text" placeholder="88" size="3"/>
						-
						<input type="number" placeholder="8334343"/>
					</p></td>
				</tr>
				<tr>
					<td><label for="mail">E-mail</label></td>
					<td colspan="3">
					<input type="email" id="mail" placeholder="mymail@somethin.com"/>
					</td>
				</tr>
				<tr>
					<td align="right"><label for="month">Birth date</label></td>
					<td colspan="3"><label for="month">Month</label>
					<input type="text" id="month" placeholder="06" size="2"/>
					<label for="day">Day</label>
					<input type="text" id="day" placeholder="14" size="2"/>
					<label for="year">Year (4 digit)</label>
					<input type="text" id="year" placeholder="1980" size="4">
					</td>
				</tr>
				<td align="right"><label for="gender">Gender</label></td>
				<td colspan="3">
				<select name="gender" id="gender">
					<option value="male" selected="selected">Male</option>
					<option value="female">Female</option>
				</select></td>
				<tr>
					<td><label for="opt1">Starting date</label></td>
					<td colspan="3">
					<input id="opt1" type="radio" value="spr06" name="opt1"/>
					<label for="opt1">Spring 2006</label>
					<input id="opt2" type="radio" value="sum06" name="opt2"/>
					<label for="opt2">Summer 2006</label></td>
				</tr>
				<tr>
					<td><label for="info">Comments/Questions</label></td>
					<td colspan="3"><textarea name="" id="info" cols="30" rows="10" placeholder="Please send me more information about the loding."></textarea></td>
				</tr>
				<tr>
					<td colspan="4">
					<input type="submit" value="Submit" name="submit"/>
					<input type="reset" value="Clear This Form" name="reset"/>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>

Задача 2. Grade Sheet:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>02. GradeSheet</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<table border="1">
			<thead>
				<tr>
					<th rowspan="2">Order</th>
					<th colspan="3">Personal Info</th>
					<th colspan="5">Uni Marks</th>
				</tr>
				<tr>
					<th>First Name</th>
					<th>Last Name</th>
					<th>Faculty Number</th>
					<th>English</th>
					<th>Math</th>
					<th>Biology</th>
					<th>Physics</th>
					<th>Total</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>1</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>2</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>3</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>4</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>5</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>6</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>7</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>8</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>9</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td>10</td>
					<td>Teodor</td>
					<td>Kurtev</td>
					<td>111119999</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
					<td>6</td>
				</tr>
				<tr>
					<td colspan="9">
						<form action="" method="post">
							<input type="button" value="Pervious" />
							<a href="">1</a>,
							<a href="">2</a>,
							<a href="">3</a>,
							<a href="">4</a>,
							.....,
							<a href="">10</a>,
							<input type="button" value="Next" />
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>

Задача 3. Inventory Table:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>03. ShipingTable</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>
	<body>
		<form action="" method="post">
			<table border="1">
				<thead>
					<tr>
						<th colspan="6">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras urna nisi, gravida vitae lacinia ac</th>
					</tr>
					<tr>
						<th><label for="input1">Product ID</label></th>
						<th><label for="input2">Product Name</label></th>
						<th><label for="input3">Unit Price</label>
						<input type="image" src="img/9.png" alt="Test img"/>
						</th>
						<th><label for="input4">Quantity per unit</label></th>
						<th><label for="input5">Unit in stock</label>
						<input type="image" src="img/9.png" alt="Test img"/>
						</th>
						<th><label for="input6">Discontinued</label>
						<input type="image" src="img/9.png" alt="Test img"/>
						</th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="6">
						<input type="image" src="img/fullleft.png" alt="fullback">
						<input type="image" src="img/left.png" alt="back">
						<a href="">1</a><a href="">2</a><a href="">3</a><a href="">4</a><a href="">5</a><a href="">6</a><a href="">7</a><a href="">8</a><a href="">9</a><a href="">10</a>...
						<input type="image" src="img/right.png" alt="forward">
						<input type="image" src="img/fullright.png" alt="fullforward">
						Page size:
						<select name="page">
							<option id="value1" value="10" selected="selected">10</option>
							<option id="value2" value="9" >9</option>
							<option id="value3" value="8" >8</option>
						</select></td>
					</tr>
				</tfoot>
				<tbody>
					<tr>
						<td>
						<input type="text" id="input1" />
						</td>
						<td>
						<input type="text" id="input2" />
						</td>
						<td>
						<input type="text" id="input3" />
						</td>
						<td>
						<input type="text" id="input4" />
						</td>
						<td>
						<input type="text" id="input5" />
						</td>
						<td>
						<input type="checkbox" id="input6" />
						</td>
					</tr>
					<tr>
						<td>1</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>2</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>3</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>4</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox" checked="checked" disabled="disabled"/>
						</td>
					</tr>
					<tr>
						<td>5</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>6</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>7</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox" checked="checked" disabled="disabled"/>
						</td>
					</tr>
					<tr>
						<td>8</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>9</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
					<tr>
						<td>10</td>
						<td>Chai</td>
						<td>&dollar; 18.00</td>
						<td>10 boxes x 20 bags</td>
						<td>39</td>
						<td>
						<input type="checkbox"/>
						</td>
					</tr>
				</tbody>

			</table>
		</form>
	</body>
</html>

Забележка: Може да използвате каквито си картинки си поискате на определените за това места в кода.
Задача 4. Apple Table:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>04. AppleTable</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<form action="" method="post">
		<table border="1">
			<tr>
				<th><a href="">Apple</a><a href="">Toshiba</a><a href="">Lenovo</a><a href="">Dell</a><a href="">Asus</a><a href="">Hacer</a><a href="">HP</a></th>
			</tr>
			<tr>
				<td>
				<table>
					<!-- 2 half table -->
					<tr>
						<td>
						<table border="1">
							<!-- Notebook warper -->
							<tr>
								<td>
								<table>
									<tr>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
									</tr>
									<tr>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
									</tr>
									<tr>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
										<td>
										<fieldset>
											<legend>
												Apple MacBook Air
											</legend>
											<table>
												<tr>
													<td rowspan="2"><img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS2Z88a6x88EsAl79Qh_bkuZv0QAj8nLDkTgSpZTlYgvpxRQseX" alt="MacBook"/></td><td>64 GB SSD</td>
												</tr>
												<tr>
													<td>2GB DDR</td>
												</tr>
												<tr>
													<td>1300 USD</td><td>Intel Core i5</td>
												</tr>
											</table>
										</fieldset></td>
									</tr>
								</table></td>
							</tr>
						</table></td>
						<td>
						<label for="minprice">
							Min price: 500 USD
						</label>
						<br/>
						<input id="minprice" type="range" min="0" max="100"/>
						<br/>
						<label for="maxprice">
							Max price: 1500 USD
						</label>
						<br/>
						<input id="maxprice" type="range" min="0" max="100"/>
						<br/>
						<label for="minram">
							Min RAM: 4 GB
						</label>
						<br/>
						<input id="minram" type="range" min="0" max="100"/>
						<br/>
						<label for="maxram">
							Min price: 16 GB
						</label>
						<br/>
						<input id="maxram" type="range" min="0" max="100"/>
						<br/>
						</td>
					</tr>
				</table></td>
			</tr>
		</table>
		</form>
	</body>
</html>

HTML tables Домашно


Това са моите решения на домашната към лекцията HTML tables:
Задача 1. Fresh Fruits:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>01. FreshFruits</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<div>
			<table>
				<thead>
					<tr>
						<th colspan="2" >Fresh Fruits</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td> Lorem Ipsum is simply dummy text of the printing and typesetting industry.
						Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
						when an unknown printer took a galley of type and scrambled it to make a type specimen book.
						It has survived not only five centuries, but also the leap into electronic typesetting,
						remaining essentially unchanged. It was popularised in the
						1960s with the release of Letraset sheets containing Lorem Ipsum passages,
						and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </td>
						<td><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTTQGNk7s2TKT68hXqgoPbYZFgtXypD2NKghmWYxUJh2LntMeIe" alt="Testing Img" width="200" height="200" /></td>
					</tr>
				</tbody>
			</table>
		</div>
	</body>
</html>

Задача 2. Letters Table:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>02. LettersTable</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<table border="1">
			<tr>
				<td colspan="3">Title goes here</td>
				<td>A</td>
				<td>B</td>
			</tr>
			<tr>
				<td rowspan="3">C</td>
				<td>D</td>
				<td>E</td>
				<td>F</td>
				<td>G</td>
			</tr>
			<tr>
				<td>H</td>
				<td colspan="2">I</td>
				<td rowspan="2">J</td>
			</tr>
			<tr>
				<td>K</td>
				<td>L</td>
				<td>M</td>
			</tr>
			<tr>
				<td>N</td>
				<td colspan="4">O</td>
			</tr>
		</table>
	</body>
</html>

Задача 3. Simple Web Form:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>03. SimpleWebForm</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
	</head>

	<body>
		<div>
			<form action="" method="post">
				<label for="name">Member name: </label>
				<input type="text" id="name" />
				<strong>*req</strong>
				<br />
				<label for="email">E-mail: </label>
				<input type="text" id="email" />
				<strong>*req</strong>
				<br />
				<label for="school">School: </label>
				<input type="text" id="school" />
				<strong>*req</strong>
				<br />
				<input type="submit" value="Submit" />
			</form>
		</div>
	</body>
</html>

Задача 4. Calculator:
HTML:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>04. Calculator</title>
		<meta name="description" content="" />
		<meta name="author" content="Teodor" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
		<link href="style/ClacStyle.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<div>
			<form action="" method="post">
				<table border="1" cellspacing="0" cellpadding="0">
					<tr>
						<td colspan="4">
							<textarea id="result" dir="rtl">123</textarea>
						</td>
					</tr>
					<tr>
						<td>
						<input type="button" value="1" />
						</td>
						<td>
						<input type="button" value="2" />
						</td>
						<td>
						<input type="button" value="3" />
						</td>
						<td>
						<input type="button" value="+" />
						</td>
					</tr>
					<tr>
						<td>
						<input type="button" value="4" />
						</td>
						<td>
						<input type="button" value="5" />
						</td>
						<td>
						<input type="button" value="6" />
						</td>
						<td>
						<input type="button" value="-" />
						</td>
					</tr>
					<tr>
						<td>
						<input type="button" value="7" />
						</td>
						<td>
						<input type="button" value="8" />
						</td>
						<td>
						<input type="button" value="9" />
						</td>
						<td>
						<input type="button" value="*" />
						</td>
					</tr>
					<tr>
						<td colspan="2">
						<input type="button" id="zero" value="0"/>
						</td>
						<td>
						<input type="button" value="." />
						</td>
						<td>
						<input type="button" value="/" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>

CSS:

#result
{
	width:202px; 
	height:40px;
}
#zero
{
	width: 102px; 
	height: 50px;
}

input[type="button"] 
{
	width: 50px;
	height: 50px;
}