Posts

Showing posts from January, 2023

PHP program to find largest number among any three number. (12)

<html> <head> <title>PHP Program To find out the biggest of given three numbers</title> </head> <body> <form method="post"> <input type="text" name="num1" /> <input type="text" name="num2" />                                    <input type="text" name="num3" value="" />                                     <input type="submit" name="submit"/> </form> <?php if(isset($_POST['submit'])) { $a = $_POST['num1']; $b = $_POST['num2']; $c = $_POST['num3']; if($a>$b && $a>$c) { echo $a."is a Big number. "; } else if($b>$c && $b>$a) { echo $b." is a Big number. "; } else if($c>$a && $c>$b) { echo $c ."is a Big number. " ; } return 0; } ?> </body> </html>

Program to find factorial of given number using JavaScript. (12)

 <html> <head> </head> <body> Enter a number: <input id = "num"> <button onclick = "fact()"> Factorial </button> <p id = "res"></p> <script> function fact(){ var i, num, f; f = 1; num = document.getElementById("num").value; for(i = 1; i <= num; i++)   { f = f * i; } i = i - 1;   document.getElementById("res").innerHTML = "The factorial of the number " + f ; } </script> </body> </html>

Specification Grid Computer 12

Image
 

SQL Statements (12)

  1.         Select CustomerName, city from customers; Selects Customer name and city field from customers table. 2.         select Distinct country from customers; Selects only different country from customer table. 3.         select * From customers where country = 'Nepal'; Selects all the records from customers table whose country is Nepal. 4.         Select * From customers where country = 'Nepal' and City = 'Butwal'; Selects all the records from customer whose country is Nepal and city is Butwal. 5.         Select * From customers where country = 'Nepal' or Country = 'India'; Selects all the records from customers whose country is either Nepal or India. 6.         Select * From customers where country In ('Nepal', 'India', 'China'); Selects all the records from customers table whose address either Nepal or India or China. 7.         Select * From product where price between 2000 and 1000; Selects all the records whose

Program Flow Chart and System Flow Chart (11/12)

Image
  Program flowchart and system flowchart Programs are the collection of set of instruction which perform some certain activities. These interrelated programs are collectively called software or in general we call it information system. Information system is capable of processing raw data into information depending upon the users requirements. Thus, information system should process several types of data for several purpose or job which are done through programs. In short information system is a collection of programs. While developing a software, we design our software by using flowchart and other several designing tools. Flowchart is the diagrammatic or pictorial representation of steps involved while solving a problem. It illustrates the sequence of operations required to solve a problem. There are mainly two types of flowchart: Program flowchart and System flowchart. Program flowchart: It represents the steps involved in solving a particular problem. It illustrates the flow

What is an ER Diagram and DataFlow Diagram? (11/12)

Image
  ER-Diagram An Entity Relationship Diagram (ER Diagram) pictorially explains the relationship between entities to be stored in a database. Fundamentally, the ER Diagram is a structural design of the database. It acts as a framework created with specialized symbols for the purpose of defining the relationship between the database entities. ER diagram is created based on three principal components: entities, attributes, and relationships. The following diagram showcases two entities - Student and Course, and their relationship. The relationship described between student and course is many-to-many, as a course can be opted by several students, and a student can opt for more than one course. Student entity possesses attributes - Stu_Id, Stu_Name & Stu_Age. The course entity has attributes such as Cou_ID & Cou_Name.   Data Flow Diagram Also known as DFD, Data flow diagrams are used to graphically represent the flow of data in a business information system. DFD descr

Link: (For LAB) (12)

 JavaScript Examples: JavaScript Examples | Programiz https://www.programiz.com/javascript/examples

JavaScript program to check given 3-digit number is Armstrong or not? (12)

 <html> <head> <title></title> </head> <body> <script type="text/javascript"> let n =parseInt(prompt("Enter a 3 digit number")); let m=n; document.write("Given number is :"+n); let p = 0; while(n>0) {     r = n%10;     p = p + r*r*r;     n = Math.floor(n/10); } if(p==m) { document.write("<br> Armstrong Number"); } else { document.write("<br> Not Armstrong Number"); } </script> </body> </html>

JavaScript Program to check given number is palindrome or not ? (12)

 <html> <head> <title></title> </head> <body> <script type="text/javascript"> let n =parseInt(prompt("Enter a number")); let m=n; document.write("Given number is :"+n); let p = 0; while(n>0) {     r = n%10;     p = p*10 + r;     n = Math.floor(n/10); } if(p==m) { document.write("<br> Palindrome Number"); } else { document.write("<br> Not Palindrome Number"); } </script> </body> </html>

JavaScript Program to find reverse of given number. (12)

 <html> <head> <title></title> </head> <body> <script type="text/javascript"> let n =parseInt(prompt("Enter a number")); document.writeln("Given number is :"+n); let p = 0; while(n>0) {     r = n%10;     p = p*10 + r;     n = Math.floor(n/10); } document.writeln("<br> Reversed number is : " + p); </script> </body> </html>