aakash2310

huhuhu_1707

Jul 17th, 2024
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.67 KB | None | 0 0
  1. <!-- 2. Create a PHP script that displays “Hello World” on the web page.-->
  2.  
  3.  
  4. <!DOCTYPE html>
  5. <html lang="en">
  6. <head>
  7. <meta charset="UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <title>program-1</title>
  10. </head>
  11. <body>
  12. <?php
  13. echo "hello world!!!"
  14. ?>
  15. </body>
  16. </html>
  17.  
  18.  
  19. <!-- 3. Create PHP script which prints Name , Roll Number & sem 2 SPI on the web page. -->
  20.  
  21. <!DOCTYPE html>
  22. <html lang="en">
  23. <head>
  24. <meta charset="UTF-8">
  25. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  26. <title>program-2</title>
  27. </head>
  28. <body>
  29. <?php
  30. echo "<h1>Name : Poojan sakhreliya</h1>";
  31. echo "<h2>Roll no. : MCA035</h2>";
  32. echo "<h3>SEM-II SPI : 9.00</h3>";
  33. ?>
  34.  
  35. </body>
  36. </html>
  37.  
  38.  
  39. <!-- 4. Create a HTML page to display your resume related information. Create a decent/
  40. professional design using CSS and/or javascript. -->
  41.  
  42. <!DOCTYPE html>
  43. <html lang="en">
  44. <head>
  45. <meta charset="UTF-8">
  46. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  47. <title>program-3</title>
  48. </head>
  49. <body>
  50. <div>
  51. <div>
  52. <div>
  53. <h1 style="text-align: center;">Poojan sakhreliya</h1>
  54. </div>
  55. <div style="text-align: center;">
  56. <h4>[email protected] &nbsp; | &nbsp; +918153858050</h4>
  57. <hr style="padding: 0px; margin: 0px;">
  58. </div>
  59. </div>
  60. <div>
  61. <h2 style="text-align: center; padding: 0px; margin: 0px;">EDUCATIONS</h2><hr style="padding: 0px; margin: 0px;"/>
  62. <div style="margin:0px 50px;">
  63. <p style="display: flex; justify-content: space-between;"><b>Dharmsinh Desai University - Naidad</b> 8.88 cpi</p>
  64. <p style="display: flex; justify-content: space-between;"><i>Master of Computer Application</i> 2023 - Present</p>
  65.  
  66. <p style="display: flex; justify-content: space-between;"><b>Sutex Bank College of Computer Application & Science - Surat</b> 9.39 CGPA</p>
  67. <p style="display: flex; justify-content: space-between;"><i>Bachelor of Computer Application</i> 2020 - 2023</p>
  68.  
  69. </div>
  70. <hr style="padding: 0px; margin: 0px;"/>
  71. </div>
  72. <div>
  73. <h2 style="text-align: center; padding: 0px; margin: 0px;">TECHNICAL SKILLS</h2><hr style="padding: 0px; margin: 0px;"/>
  74. <div style="margin-left: 50px;">
  75. <p><b>Programming language</b> : c,c++,java,javascript</p>
  76. <p><b>Library/Framwork</b> : ReactJs,ExpressJs,TailwindCSS</p>
  77. <p><b>platforms</b> : Git ,Github,Vs code,Postman,Docker</p>
  78. <p><b>Others</b> : Nodejs,MongoDB,MySQL,OOPS,Data Structure</p>
  79. </div>
  80. <hr style="padding: 0px; margin: 0px;"/>
  81. </div>
  82.  
  83. <div>
  84. <h2 style="text-align: center; padding: 0px; margin: 0px;">PROJECTS</h2><hr style="padding: 0px; margin: 0px;"/>
  85. <div style="margin-left: 50px; margin-top: 10px;">
  86. <p style="margin: 0px;"><b>1. &nbsp;&nbsp;FoodPoint Online Food Delivery</b></p>
  87. <i style="margin: 0px;">January 2023 - April 2023</i>
  88. <p style="margin:0px;"><b>Role : </b> Frontend Developer</p>
  89.  
  90. <li style="margin-top: 5px;">Design and implemented four model : Customer , resturent owner , delivery , admin</li>
  91. <li>integrated secure pyment system</li>
  92. <li>real-time track order </li>
  93.  
  94. </div>
  95. <div style="margin-left: 50px; margin-top: 30px;">
  96. <p style="margin: 0px;"><b>2. &nbsp;&nbsp;Buy-Bazzar Ecommerce App </b></p>
  97. <i style="margin: 0px;">March 2024 - present</i>
  98. <p style="margin:0px;"><b>Role : </b> Full stack Developer</p>
  99.  
  100. <li style="margin-top: 5px;">Design and implemented four model : Customer , seller , admin</li>
  101. <li>send mail using RabbitMQ with seamless</li>
  102. <li>real-time send order data using socketio </li>
  103. <li>for authorization and authetication use JWT and PassportJS </li>
  104. </div>
  105. </div>
  106.  
  107. </div>
  108. </body>
  109. </html>
  110.  
  111. <!-- 5. Design a user registration form in HTML for a technical and cultural fair of a university.
  112. Required information is Name, branch, semester, roll number, email id, contact number,
  113. subject of interest (out of - Cultural, Web Publishing, Technical, Finance, Publication,
  114. Reception and hosting) and signature. Also mention past experience of participation in
  115. such activity if any. -->
  116. <!DOCTYPE html>
  117. <html lang="en">
  118.  
  119. <head>
  120. <meta charset="UTF-8">
  121. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  122. <title>program-4</title>
  123. </head>
  124.  
  125. <body>
  126.  
  127. <div style="width: 100vw; height: 100vh; background-color: bisque; display: flex; align-items: center; justify-content: center;">
  128.  
  129. <form action="p1.html" style="background-color: lightblue; width: 500px; height: 500px; border: 2px solid black; padding: 20px; box-shadow: 2px 2px 20px 2px black; display: flex; flex-direction: column; justify-content: space-around;">
  130. <h1 style="text-align: center;">Registration Form</h1>
  131. <div>
  132. <label for="name">Name : </label>
  133. <input type="text" placeholder="Enter the name.." name="name" style="padding: 5px;">
  134. </div>
  135.  
  136. <div>
  137. <label for="branch">Branch : </label>
  138. <select name="branch" id="branch" style="padding: 5px;">
  139. <option value="mca">MCA</option>
  140. <option value="mba">MBA</option>
  141. <option value="mbbs">MBBS</option>
  142. <option value="ce">CE</option>
  143. <option value="be">BE</option>
  144. </select>
  145. </div>
  146.  
  147. <div>
  148. <label for="semester">Semester : </label>
  149. <select name="semester" id="brasemesternch" style="padding: 5px;">
  150. <option value="1">1</option>
  151. <option value="2">2</option>
  152. <option value="3">3</option>
  153. <option value="4">4</option>
  154. <option value="5">5</option>
  155. <option value="6">6</option>
  156. </select>
  157. </div>
  158.  
  159. <div>
  160. <label for="rollno">Roll Number : </label>
  161. <input type="text" id="rollno" name="rollno" placeholder="Enter the roll number.." style="padding: 5px;">
  162. </div>
  163.  
  164. <div>
  165. <label for="email">Email : </label>
  166. <input type="email" id="email" name="email" placeholder="Enter the email.." style="padding: 5px;">
  167. </div>
  168.  
  169. <div>
  170. <label for="mobileno">Mobile Number : </label>
  171. <input type="text" id="mobileno" name="mobileno" placeholder="Enter the mobile number.." maxlength="10" style="padding: 5px;">
  172. </div>
  173.  
  174. <div>
  175. <label for="subjectofi">subject of interest : </label>
  176. <select name="subjectofi" id="subjectofi" style="padding: 5px;">
  177. <option value="cultural">Cultural</option>
  178. <option value="webPublishing">Web Publishing</option>
  179. <option value="technica">Technica</option>
  180. <option value="finance">Finance</option>
  181. <option value="publication">Publication</option>
  182. <option value="reception">Reception</option>
  183. <option value="hosting">Hosting</option>
  184.  
  185. </select>
  186. </div>
  187.  
  188. <div>
  189. <label for="past">Past Experience : </label>
  190. <textarea id="past" placeholder="Enter the past experience.." style="padding: 5px;" name="pastEx"></textarea>
  191. </div>
  192.  
  193. <div style="display: flex; justify-content: center;">
  194. <button style="width: 100px; height: 40px;">Submit</button>
  195. </div>
  196.  
  197. </form>
  198.  
  199. </div>
  200.  
  201. </body>
  202.  
  203. </html>
  204.  
  205. <!DOCTYPE html>
  206. <html lang="en">
  207.  
  208. <head>
  209. <meta charset="UTF-8">
  210. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  211. <title>Document</title>
  212. <script>
  213. function submit()
  214. {
  215. // e.preventDefault();
  216. // console.log(e);
  217. console.log("hello");
  218. }
  219.  
  220. </script>
  221. </head>
  222. <body>
  223. <div style="width: 100vw; height: 100vh; background-color: bisque; display: flex; align-items: center; justify-content: center;">
  224.  
  225. <form style="background-color: lightblue; width: 500px; height: 500px; border: 2px solid black; padding: 20px; box-shadow: 2px 2px 20px 2px black; display: flex; flex-direction: column; justify-content: space-around;">
  226. <h1 style="text-align: center;">Registration Form</h1>
  227. <div>
  228. <label for="firstname">First Name : </label>
  229. <input type="text" placeholder="Enter the first name.." name="firstname" style="padding: 5px;">
  230. </div>
  231. <div>
  232. <label for="middlename">Middle Name : </label>
  233. <input type="text" placeholder="Enter the middle name.." name="middlename" style="padding: 5px;">
  234. </div>
  235. <div>
  236. <label for="lastname">Last Name : </label>
  237. <input type="text" placeholder="Enter the last name.." name="lastname" style="padding: 5px;">
  238. </div>
  239.  
  240. <div>
  241. <label for="address">Address : </label>
  242. <textarea id="address" placeholder="Enter the address .." style="padding: 5px;" name="address"></textarea>
  243. </div>
  244.  
  245. <div>
  246. <label for="email">Email : </label>
  247. <input type="email" id="email" name="email" placeholder="Enter the email.." style="padding: 5px;">
  248. </div>
  249.  
  250. <div>
  251. <label for="mobileno">Mobile Number : </label>
  252. <input type="text" id="mobileno" name="mobileno" placeholder="Enter the mobile number.." maxlength="10" style="padding: 5px;">
  253. </div>
  254.  
  255. <div>
  256. <label for="discription">Discription : </label>
  257. <textarea id="discription" placeholder="Enter the discription .." style="padding: 5px;" name="discription"></textarea>
  258. </div>
  259. <div style="display: flex; justify-content: center;">
  260. <button type="button" style="width: 100px; height: 40px;" onclick="submit()">Submit</button>
  261. </div>
  262. </form>
  263.  
  264. </div>
  265. </body>
  266.  
  267. </html>
  268.  
  269.  
  270.  
  271. <!-- 1. Write appropriate HTML-JavaScript-jQuery code for the following requirements:
  272. a. Assign appropriate font size, font family and background color to the <p> tag
  273. using the style property.
  274. b. Use the above <p> tag in three places in a html document and set this common
  275. style property to above tag.
  276. c. Use the above code to style the tags in multiple pages by using common file. -->
  277.  
  278. <!DOCTYPE html>
  279. <html lang="en">
  280. <head>
  281. <meta charset="UTF-8">
  282. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  283. <title>Document</title>
  284. <script src="../jquery-3.7.1.min.js"></script>
  285. </head>
  286. <body>
  287. <p style="font-size: large; font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; background-color: red;">static p</p>
  288. <p>dynamic-1</p>
  289. <p>dynamic-2</p>
  290. <p>dynamic-3</p>
  291.  
  292.  
  293. <script>
  294. $('p').css({"font-size": "large","font-family": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif","background-color": "orange"})
  295. </script>
  296. </body>
  297. </html>
  298.  
  299. <!DOCTYPE html>
  300. <html lang="en">
  301. <head>
  302. <meta charset="UTF-8">
  303. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  304. <title>Document</title>
  305. <script src="../jquery-3.7.1.min.js"></script>
  306. </head>
  307. <body>
  308. <p>otherp-1</p>
  309. <p>otherp-2</p>
  310. <p>otherp-3</p>
  311.  
  312. <script src="./pStyle.js"></script>
  313.  
  314. </body>
  315. </html>
  316.  
  317.  
  318. $('p').css({"font-size": "large","font-family": "'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif","background-color": "orange"})
  319.  
  320.  
  321. <!-- 2. Write appropriate HTML-JavaScript-jQuery code for the following requirements:
  322. a. Create a button, on click of it, welcome message should be displayed on web
  323. page just besides the button.
  324. b. Create three input textboxes. On click of each input box, change its background
  325. color to yellow.
  326. c. Create two style properties and by default apply first one to a paragraph. On a
  327. button click, change the paragraph style to other style.
  328. d. On paragraph-click, toggle its style.
  329. e. Create one button and a textbox. On button-click, set its value to the text written
  330. in the text box. -->
  331.  
  332. <!DOCTYPE html>
  333. <html lang="en">
  334. <head>
  335. <meta charset="UTF-8">
  336. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  337. <title>Document</title>
  338. <script src="../jquery-3.7.1.min.js"></script>
  339.  
  340. </head>
  341. <body>
  342.  
  343. <div style="display: flex;" id="message">
  344. <button onclick="showMessage()">Click to Welcome message</button>
  345. </div>
  346.  
  347. <div>
  348. <input type="text" id="input1">
  349. <input type="text" id="input2">
  350. <input type="text" id="input3">
  351. <input type="text" id="input4">
  352. </div>
  353.  
  354. <div>
  355. <p id="p1">hello World!!!</p>
  356. <button onclick="changeStyle()">Change Style</button>
  357. </div>
  358.  
  359. <div>
  360. <p id="toggleStyle" style="background-color: bisque; color: brown;">on click Toggle Style</p>
  361. </div>
  362.  
  363. <div>
  364. <input type="text" name="txt" id="txt" >
  365. <button onclick="changeValue(this)">My name is Poojan!!</button>
  366. </div>
  367.  
  368.  
  369. <script>
  370. function showMessage()
  371. {
  372. $("#message").append("<p style='color:red;'>Welcome back poojan !!!</p>")
  373. }
  374.  
  375. $("input").click((e)=>{
  376. // console.log(e);
  377. $(`#${e.target.id}`).css({"background-color":"yellow"})
  378. })
  379.  
  380. function changeStyle()
  381. {
  382. console.log("hello");
  383. $("#p1").css({"background-color":"yellow","color":"red"})
  384. }
  385.  
  386. let toggle=true;
  387. $("#toggleStyle").click((e)=>{
  388. if(toggle)
  389. $(`#${e.target.id}`).css({"background-color":"yellow","color":"blue"})
  390. else
  391. $(`#${e.target.id}`).css({"background-color":"bisque","color":"brown"})
  392. toggle=!toggle;
  393. })
  394.  
  395. function changeValue(e)
  396. {
  397. e.textContent=$("#txt").val()
  398. }
  399.  
  400. </script>
  401. </body>
  402. </html>
  403.  
  404. <!-- 3. Write appropriate HTML-JavaScript-jQuery code for the following requirements:
  405. a. When the document is ready, create a div tag (id: div1) to display display
  406. Welcome message.
  407. b. Create two div tags (id: div2 and div3). When mouse moves over the div1,
  408. assign green as background color to both div2 and div3. When mouse moves
  409. out the div1, resent background color to white.
  410. c. Display and hide a paragraph on click of two buttons btnShow and btnHide.
  411. d. Perform the above task 3-c using a single button. toggle(). -->
  412.  
  413. <!DOCTYPE html>
  414. <html lang="en">
  415.  
  416. <head>
  417. <meta charset="UTF-8">
  418. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  419. <title>Program-3</title>
  420. <script src="../jquery-3.7.1.min.js"></script>
  421. </head>
  422.  
  423. <body>
  424.  
  425. <div id="div2">Div-2</div>
  426. <div id="div3">Div-3</div>
  427.  
  428. <div>
  429. <button onclick="showPara()">Show!!</button>
  430. <button onclick="hidePara()">Hide!!</button>
  431. <button onclick="togglePara()">Toggle!!</button>
  432. <p id="hideShow">paragraph show !!!</p><br>
  433. </div>
  434.  
  435.  
  436.  
  437. <script>
  438. $(document).ready(() => {
  439. $(document.body).prepend("<div id='div1' style='width:650px;height:50px;border:2px solid black;'>Welcome message</div>")
  440.  
  441. $("#div1").mouseover(() => {
  442. $("#div2").css({ "background-color": "green" })
  443. $("#div3").css({ "background-color": "green" })
  444. })
  445.  
  446. $("#div1").mouseout(() => {
  447. $("#div2").css({ "background-color": "white" })
  448. $("#div3").css({ "background-color": "white" })
  449. })
  450.  
  451. })
  452.  
  453. let toggle = true;
  454. function showPara() {
  455. $("#hideShow").css({ "display": "block" })
  456. toggle=true;
  457. }
  458. function hidePara() {
  459. $("#hideShow").css({ "display": "none" })
  460. toggle=false;
  461. }
  462.  
  463. function togglePara() {
  464. if (toggle)
  465. $("#hideShow").css({ "display": "none" })
  466. else
  467. $("#hideShow").css({ "display": "block" })
  468. toggle = !toggle;
  469. }
  470.  
  471.  
  472. </script>
  473. </body>
  474.  
  475. </html>
  476.  
  477. <!-- 4. Write appropriate HTML-JavaScript-jQuery code for the following requirements:
  478. a. Create one textarea (id: ta1) and one button (id: showTextCount).
  479. On click of the button, display count of text available in ta1 on document.
  480. b. Create one textarea (id: ta2).
  481. Update text count as and when text is entered. Display the same on document.
  482. c. Restrict the max. number of characters to 10 in ta2. -->
  483.  
  484. <!DOCTYPE html>
  485. <html lang="en">
  486. <head>
  487. <meta charset="UTF-8">
  488. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  489. <title>program-4</title>
  490. <script src="../jquery-3.7.1.min.js"></script>
  491. </head>
  492. <body>
  493. <textarea name="txt" id="ta1" cols="30" rows="10"></textarea>
  494. <button onclick="countChr()">count characters!!</button>
  495. <p id="result" style="color: red;"></p>
  496.  
  497. <textarea name="txt" id="ta2" cols="30" rows="10" maxlength="10"></textarea>
  498. <p id="result2"></p>
  499. <h1 id="showText"></h1>
  500.  
  501.  
  502. <script>
  503. function countChr()
  504. {
  505. let txt=$("#ta1").val();
  506. $("#result").text(`total character is : ${txt.length}`)
  507. }
  508.  
  509. $("#ta2").keyup(()=>{
  510. console.log("hello");
  511. let txt=$("#ta2").val();
  512. $("#result2").text(`total character is : ${txt.length}`)
  513. $("#showText").text(`${txt}`)
  514.  
  515.  
  516. })
  517.  
  518. </script>
  519.  
  520. </body>
  521. </html>
  522.  
  523. <!-- 5. Write appropriate HTML-JavaScript-jQuery code for the following requirements:
  524. a. Create one style class with name ‘error’:-
  525. i. border color : red
  526. ii. background color : yellow.
  527. iii. Apply this class to a text box when the focus is moved out of it and if
  528. entered data is a negative number.
  529. b. Create two textboxes and one button with + on it. On click of the + button,
  530. display sum of the numbers entered in two textboxes. Also perform same
  531. functionality for subtract, multiply and divide buttons.
  532. c. The buttons in above code 5-b should remain in disable state until any one or
  533. both of the textboxes are vacant. -->
  534. <!DOCTYPE html>
  535. <html lang="en">
  536.  
  537. <head>
  538. <meta charset="UTF-8">
  539. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  540. <title>program-5</title>
  541. <style>
  542. .error {
  543. border: 2px solid red;
  544. background-color: yellow;
  545.  
  546. }
  547. </style>
  548. <script src="../jquery-3.7.1.min.js"></script>
  549. </head>
  550.  
  551. <body>
  552.  
  553. <div>
  554. <input type="number" id="number" placeholder="enter the number..">
  555. </div>
  556.  
  557. <script>
  558. $("#number").keyup(()=>{
  559. let val = Number($("#number").val());
  560. if (val < 0)
  561. $("#number").addClass("error");
  562. else
  563. $("#number").removeClass("error");
  564. })
  565. $("#number").(()=>{
  566. $("#number").addClass("error");
  567. })
  568. $("#number").focus(()=>{
  569. $("#number").removeClass("error");
  570. })
  571.  
  572. </script>
  573.  
  574. </body>
  575.  
  576. </html>
  577.  
  578. using System;
  579. using System.Collections.Generic;
  580. using System.Linq;
  581. using System.Text;
  582. using System.Threading.Tasks;
  583.  
  584. namespace lab_2
  585. {
  586. class Program
  587. {
  588. static void Main(string[] args)
  589. {
  590. int a ;
  591. int b ;
  592. a=Convert.ToInt32(Console.ReadLine());
  593. b = Convert.ToInt32(Console.ReadLine());
  594.  
  595. Console.WriteLine("sum of numbers :" + (a + b));
  596. Console.WriteLine("substraction of numbers :" + (a - b));
  597. Console.WriteLine("multiplication of numbers :" + (a * b));
  598. Console.WriteLine("Divison of numbers :" + (a / b));
  599.  
  600. Console.ReadKey();
  601.  
  602.  
  603. }
  604. }
  605. }
  606.  
  607.  
  608. using System;
  609. using System.Collections.Generic;
  610. using System.Linq;
  611. using System.Text;
  612. using System.Threading.Tasks;
  613.  
  614. namespace lab_2
  615. {
  616. class Program
  617. {
  618. static void Main(string[] args)
  619. {
  620. int a;
  621. Console.WriteLine("Enter the number : ");
  622. a=Convert.ToInt32(Console.ReadLine());
  623.  
  624. bool flag = true;
  625. for(int i=2;i<a/2;i++)
  626. {
  627. if (a % i == 0)
  628. flag = false;
  629. }
  630.  
  631. if (flag)
  632. Console.WriteLine("this is prime number!!");
  633. else
  634. {
  635. Console.WriteLine("factor of number is : ");
  636. for (int i = 1; i <= a; i++)
  637. {
  638. if (a % i == 0)
  639. Console.Write(i+" ");
  640. }
  641. }
  642.  
  643.  
  644. Console.ReadKey();
  645.  
  646.  
  647. }
  648. }
  649. }
  650.  
  651.  
  652. using System;
  653. using System.Collections.Generic;
  654. using System.Linq;
  655. using System.Text;
  656. using System.Threading.Tasks;
  657.  
  658. namespace lab_2
  659. {
  660. class Program
  661. {
  662. static void Main(string[] args)
  663. {
  664. if(args.Length>0)
  665. {
  666. Console.WriteLine(args[0]);
  667. Console.WriteLine(args[1]);
  668.  
  669. }
  670.  
  671. Console.ReadKey();
  672.  
  673.  
  674. }
  675. }
  676. }
  677.  
  678.  
  679. using System;
  680. using System.Collections.Generic;
  681. using System.Linq;
  682. using System.Text;
  683. using System.Threading.Tasks;
  684.  
  685. namespace lab_2
  686. {
  687. class Program
  688. {
  689. static void Main(string[] args)
  690. {
  691. int sum = 0;
  692. for(int i=1;i<=10;i++)
  693. {
  694. Console.WriteLine(i);
  695. sum += i;
  696. }
  697. Console.Write("Sum is :" + sum);
  698.  
  699. Console.ReadKey();
  700.  
  701. }
  702. }
  703. }
  704.  
  705.  
  706. using System;
  707. using System.Collections.Generic;
  708. using System.Linq;
  709. using System.Text;
  710. using System.Threading.Tasks;
  711.  
  712. namespace lab_2
  713. {
  714. class Program
  715. {
  716. static void Main(string[] args)
  717. {
  718. //int sumDigit = 0,num;
  719. //Console.WriteLine("Enter number :" );
  720. //num = Convert.ToInt32(Console.ReadLine());
  721. //int reverseNum = 0;
  722. //while(num!=0)
  723. //{
  724. // reverseNum = (reverseNum * 10) + (num % 10);
  725. // sumDigit += (num % 10);
  726. // num /= 10;
  727. //}
  728. //Console.WriteLine("Reverse Number is :"+reverseNum);
  729. //Console.WriteLine("sum is Number is : " + sumDigit);
  730.  
  731. //int fab;
  732. //Console.WriteLine("Enter number for fibonacci :");
  733. //fab = Convert.ToInt32(Console.ReadLine());
  734. //int a = 1, b = 0, c = 0;
  735. //if (fab <= 1)
  736. //{
  737. // Console.WriteLine(b + " " + a);
  738. //}
  739. //else
  740. //{
  741. // Console.Write(b + " " + a+" ");
  742. // for (int i = 2; i <= fab; i++)
  743. // {
  744. // c = a + b;
  745. // Console.Write(c + " ");
  746. // b = a;
  747. // a = c;
  748. // }
  749. //}
  750.  
  751. int[,] arr1 = new int[3, 3];
  752. int[,] arr2 = new int[3, 3];
  753. int[,] addition = new int[3, 3];
  754. int[,] multiplication = new int[3, 3];
  755.  
  756. Console.WriteLine("Enter the elements of array-1");
  757. for (int i = 0; i < 3; i++)
  758. {
  759. for (int j = 0; j < 3; j++)
  760. {
  761. arr1[i,j] = Convert.ToInt32(Console.ReadLine());
  762. }
  763. }
  764.  
  765. Console.WriteLine("Enter the elements of array-2");
  766. for (int i = 0; i < 3; i++)
  767. {
  768. for (int j = 0; j < 3; j++)
  769. {
  770. arr2[i, j] = Convert.ToInt32(Console.ReadLine());
  771. }
  772. }
  773.  
  774. for (int i=0;i<3;i++)
  775. {
  776. for(int j=0;j<3;j++)
  777. {
  778. addition[i,j] = arr1[i,j] + arr2[i,j];
  779. }
  780. }
  781.  
  782. for (int i = 0; i < 3; i++)
  783. {
  784. for (int j = 0; j < 3; j++)
  785. {
  786. for(int k=0;k<3;k++)
  787. {
  788. multiplication[i,j] += (arr1[i, k] * arr2[k, j]);
  789. }
  790. }
  791.  
  792. }
  793.  
  794. Console.WriteLine("Additon of array-1 and array-2");
  795. for (int i = 0; i < 3; i++)
  796. {
  797. for (int j = 0; j < 3; j++)
  798. {
  799. Console.Write(addition[i, j] + " ");
  800. }
  801. Console.WriteLine();
  802. }
  803.  
  804. Console.WriteLine("Multiplation of array-1 and array-2");
  805. for (int i = 0; i < 3; i++)
  806. {
  807. for (int j = 0; j < 3; j++)
  808. {
  809. Console.Write(multiplication[i, j] + " ");
  810. }
  811. Console.WriteLine();
  812.  
  813. }
  814.  
  815.  
  816.  
  817.  
  818.  
  819. Console.ReadKey();
  820.  
  821. }
  822. }
  823. }
  824.  
  825.  
  826. using System;
  827. using System.Collections.Generic;
  828. using System.Linq;
  829. using System.Text;
  830. using System.Threading.Tasks;
  831.  
  832. namespace lab_2
  833. {
  834. class Program
  835. {
  836.  
  837. void getMinMax(int[] arr)
  838. {
  839. int min = arr[0];
  840. int max = arr[1];
  841. for(int i=0;i<arr.Length;i++)
  842. {
  843. if (min < arr[i])
  844. min = arr[i];
  845. if (max > arr[i])
  846. max = arr[i];
  847. }
  848. Console.WriteLine("Min value of array : "+min);
  849. Console.WriteLine("Max value of array : " + max);
  850.  
  851. }
  852. static void Main(string[] args)
  853. {
  854. int a, b;
  855. Console.WriteLine("Enter the elements..");
  856. int n=Convert.ToInt32(Console.ReadLine());
  857. int[] arr = new int[n];
  858. for(int i=0;i<n;i++)
  859. {
  860. arr[i]=Convert.ToInt32(Console.ReadLine());
  861. }
  862. var p1 = new Program();
  863. p1.getMinMax(arr);
  864.  
  865.  
  866.  
  867. Console.ReadKey();
  868.  
  869. }
  870. }
  871. }
  872.  
  873.  
  874. using System;
  875. using System.Collections.Generic;
  876. using System.Linq;
  877. using System.Text;
  878. using System.Threading.Tasks;
  879.  
  880. namespace lab_2
  881. {
  882. class Program
  883. {
  884.  
  885.  
  886. static void Main(string[] args)
  887. {
  888. int[][] arr1 = new int[5][];
  889. arr1[0] = new int[] { 31, 22, 13, 4 };
  890. arr1[1] = new int[] { 111, 94, 67 };
  891. arr1[2] = new int[] { 89, 23 };
  892. arr1[3] = new int[] { 0, 425, 78, 513, 99 };
  893. arr1[4] = new int[] { 2,23 };
  894.  
  895.  
  896. for (int i = 0; i < arr1.Length; i++)
  897. {
  898. Array.Sort(arr1[i]);
  899. for (int j = 0; j < arr1[i].Length; j++)
  900. {
  901. Console.Write(arr1[i][j] + " ");
  902. }
  903. Console.WriteLine();
  904. }
  905.  
  906. Console.WriteLine("Reverse array..");
  907.  
  908. for (int i = 0; i < arr1.Length; i++)
  909. {
  910. Array.Reverse(arr1[i]);
  911. for (int j = 0; j < arr1[i].Length; j++)
  912. {
  913. Console.Write(arr1[i][j] + " ");
  914. }
  915. Console.WriteLine();
  916. }
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923. Console.ReadKey();
  924.  
  925. }
  926. }
  927. }
  928.  
  929.  
Advertisement
Add Comment
Please, Sign In to add comment