-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
60 lines (55 loc) · 4.6 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<title>Student Home Welcome</title>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>
<div class="header">
<div class="lheader">
<img src ="vit.png" width="200" height="86">
</div>
<div class="rheader">
<ul>
<li style="line-height: 40px;"><b>Vellore Institute of Technology</b></li>
<li><font size="-0.5">Login</font></li>
<li><font size="-0.5">Features</font></li>
<li><font size="-0.5">Contact</font></li>
</ul>
</div>
</div>
<div style="margin-bottom: 40px;">
<table style="margin-left: 40px;">
<tr>
<td style="background-color:rgb(249,249,249);width=100px">
<p style="color: green;font-family: Seogoe UI;font-size: 28px;margin-top: 20px;font-weight: 500;">New Number System</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">A new k – base number system using the symbols 0, 1, 2, ..., k-1 is developed. Each number in the k-base number system is separated by a comma. Let a1,a2,a3 be a number in k-base number system where ai f ε {0, 1, 2, ..., k-1} then value of the number in decimal number system is a3*k2+a2*k1+a1*k0. In a 18-based number system, value of the number 16, 17, 15 is 15*182+17*181+15*180. Given two numbers in k-base number system, write a code to print the sum of the numbers in k-base system.</p>
<p style="color: black;font-family: Seogoe UI;font-size: 21px;margin-top: 20px;font-weight: 600;">Note:</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">Use atoi for string to integer convesion. Refer the below code for reference</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">#include</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">using namespace std;</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">int main ()</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">{</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">char s[100];</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">cin>>s;</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">int i=atoi(s);</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">cout</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">}</p>
<p style="color: black;font-family: Seogoe UI;font-size: 21px;margin-top: 20px;font-weight: 600;">Input Format</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">First line contains the base of number system, k</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">Next line contains the number n1 in k-base number system</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">Next line contains the number n2 in k-base number system</p>
<p style="color: black;font-family: Seogoe UI;font-size: 21px;margin-top: 20px;font-weight: 600;">Output Format</p>
<p style="color: black;font-family: Seogoe UI;font-size: 19px;margin-top: 20px;font-weight: 400;">Print the sum of n1 and n2 in k-base number system</p>
</tr>
</table>
<br>
<table style="margin-left: 40px;">
<tr>
<td style="background-color:rgb(39,40,34); width:800px;height:400px"></td>
</tr>
</table>
<br><br>
<a href="#" class="buttonone" style="text-decoration:none; display:inline-block;">Run code</a> <a href="#" class="buttontwo" style="text-decoration:none; display:inline-block;">Save code</a> <a href="#" class="buttonthree" style="text-decoration:none;">Pause Test</a>
</div>
</body>
</html>