Posts

Showing posts from 2022

Insert delete using Queue in C

 Program #include<stdio.h>    #include<stdlib.h>   void insert();   void dequeue();   void display();   int front = -1, rear = -1 ,maxsize;   int queue[100];   int main ()   {       int choice;        printf("\n Enter the size of QUEUE : ");     scanf("%d",&maxsize);     printf("\n QUEUE OPERATIONS USING ARRAY");     printf("\n1.insert an element\n2.Delete an element\n3.Display the queue\n4.Exit");       while(choice != 4)        {              printf("\nEnter your choice : ");           scanf("%d",&choice);           switch(choice)           {               case 1:             ...

Reflection of triangle|computer graphics|

Image
 Reflection triangle in 2D transformation code #include <conio.h> #include <graphics.h> #include <stdio.h>    // Driver Code void main() {     int gm, gd = DETECT, a,x1,y1,x2,y2,x3,y3;     initgraph(&gd, &gm, "c:\\turboc3\\bgi");     cleardevice();        // Draw the graph     line(getmaxx() / 2, 0, getmaxx() / 2,          getmaxy());     line(0, getmaxy() / 2, getmaxx(), getmaxy() / 2); printf("Enter x1 and y1:\n"); scanf("%d%d",&x1,&y1); printf("Enter x2 and y2"); scanf("%d%d",&x2,&y2); printf("Enter x3 and y3\n"); scanf("%d%d",&x3,&y3);     setcolor(14);     line(x1, y1, x2, y2);     line(x2, y2, x3, y3);     line(x3, y3, x1, y1);///     getch(); printf("Enter 1 for x and 2 for y:\n"); scanf("%d",&a); switch(a){ case 1:     setcolor(3);     line(getma...

COMPOSITE 2D C PROGRAM|Computer graphics|

Image
COMPOSITE 2D TRANSFORMATION code: #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <math.h> int xa,xb,xc,ya,yb,yc,y1a,y1b,y1c,x1a,x1b,x1c,x2a,x2b,x2c,y2a,y2b,y2c; int x3a,x3b,x3c,y3a,y3b,y3c,x4a,x4b,x4c,y4a,y4b,y4c,x5a,x5b,x5c,y5a,y5b,y5c; int tx,shx,t,ch,a,ty; float ang,theta,sx,sy; int main(void) { int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode,"c:\\turboc3\\bgi"); printf("Enter all coordinates values :"); scanf("%d %d %d %d %d %d",&xa,&ya,&xb,&yb,&xc,&yc); setcolor(GREEN); line(xa,ya,xb,yb); /* draw the original image*/ line(xb,yb,xc,yc); line(xc,yc,xa,ya); printf("Enter the value tranlsation factor :"); /* get the translation factor*/ scanf("%d",&tx); printf("Enter ty:"); scanf("%d",&ty); x1a=xa+tx; x1b=xb+tx; x1c=xc+tx; y1a=ya+ty; y1b=yb+ty; y1c=yc+ty; setcolor(RED); line(x1a,y1a,x1b,...

PL/SQL program to print a string and number |PL/SQL|

PL/SQL PL/SQL is a block structured language that can have multiple blocks in it Pl/SQL stands for "Procedural Language extension of SQL" that is used in Oracle. PL/SQL includes procedural language elements like conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types and triggers. code: DECLARE name varchar(50):='Hello world'; reg_no varchar(20):='24'; BEGIN dbms_output.put_line('Name: '||name); dbms_output.put_line('Registered number: '||reg_no); END; / Code Explanation: dbms_output.put_line(): It is used for printing the output to the console screen. The DBMS_OUTPUT is a built-in package that enables you to display output, debugging information. The put_line is the most useful function to enable the package for the write data in the program.  Here the first line turns on serveroutput .  the SERVEROUTPUT setting controls whether SQL*Plus prints the output generate...

C PROGRAM TO FIND LEAP YEAR |LEAP YEAR|

Image
 C program to find leap year or not Code: #include<stdio.h> int main() { int year; printf("enter the year:"); scanf("%d",&year); if((year % 400==0)&&(!year % 100==0)||(year % 4==0)) {       printf("year %d is a leap year",year); } return 0; } Explanation: The user enter the year. The user entered year is stored in variable called "year" which is a integer datatype. We had used if statement to check whether the entered year is leap year or not. In if condition year%400=0 and ! year%100==0 or year%4=0 will be true only if both conditions are stratified. If the condition is true then it will print the year is leap year . If the condition is false then the printf statement won't be printed. It will come out of the condition. Output:

HTML WEBPAGES |Quiz in HTML| |FORMS| |Radio Checkbox buttons|

 code: <!DOCTYPE html> <html> <h1 style="background-color:aquamarine;"><center>QUIZME</center></h1> <fieldset> <form action="/ans_page.php" method="get"> <legend><h1>General Knowledge</legend></h1><br> <form> <h3><p><i>1)Mars is named after which Roman god?</p></i><br> <input type="radio" name="rad" id="god of war"> <label for="god of war">God of war</label><br> <input type="radio" name="rad" id="god of love"> <label for="god of love">God of love</label><br> <input type="radio" name="rad" id="god of fire"> <label for="god of fire">God of fire</label><br> <h3><p><i>2)What are the main constituents of Mars's atmosphere?</p>...

HTML |WEBPAGES| |WEBPAGE USING HTML|

 CODE: <!DOCTYPE HTML> <html> <h1><center>APOLLO COMPUTER ACADEMY</h1> <h2><center>SUCESS STARTS HERE</h2></center> <marquee scrollamount="50"><a href="https://www.apollocomputereducation.in/"><img src="images/apollo.jpg" width="700" height="500" ><img src="images/student.jpg" width="700" height="500"><img src="images/com.jpg" width="700" height="500"></a><br><br></marquee> <h2>Welcome to Apollo computer academy</h2> <h2><bold>Apollo computer academy started ONLINE CLASSES</bod></h2> <h3>Join any course learn from home through online</h3> <ul> <li>MS OFFICE,C,C++</li> <li>PYTHON,JAVA</li> <li>TALLY-GST,AUDITING-TAXATION PHOTOSHOP,DTP,EDITING,WEB-DESIGN</li> <li>GRAPHIC DESIGN,2...

HTML |WEBPAGE| |WEBPAGES USING HTML|

 CODE <!DOCTYPE html> <html> <head> <style type="text/css"> .back-img{ background-image: url(images/multi1.jpg); width:100%; height:900px; background-size: cover; } .text{ text-aling:center; color:black; font-size: 25px; font-weight: bold; margin-top: 240px; } .line-1{ width: 40%; } </style> </head> <div class="back-img"> <div class="text"> <a href="https://grthotels.com/madurai"> <h1><center><font color="lime">Multi Restaurant</center></h1></a></font> </div> </div> <body><br><br> <h1><font color="#FF8000">Speciality</h1></font> <h2><font color="#8A084B">THAI CHICKEN^$13.25/20.50<br> Peanut sauce with cheese,<br> chicken, onion & cilantro (^contains peanuts)</h2></font> <h2><font color="#8A084B">PAISANO^$14.2...

HTML |ADVERTISING| |WEBPAGE|

 CODE: <!DOCTYPE HTML> <html> <h1><center><font color="quamarine">DHARSHINI EVENTS</h1></center></font> <marquee scrollamount="50"><img src="images/event.jpg" width="300" height="300">  <img src="images/event2.jpg" width="300" height="300">  <img src="images/event3.jpg" width="300" height="300"></marquee> <hr:1-line</hr> <p><h2><font color="hotpink">We arrange your important function with creative ideas to make it a memorable one.We also customize our services to make your dream true</p></h2></font> <ul> <li><h3><font color="blue">Destination wedding</li> <center><img src="images/marriage.jpg" width="300" height="300"></center> <li><h3>Reception<...

HTML WALLPAPER ADVERTISEMENT |ADVERTISEMENT USING HTML|

 CODE: <!DOCTYPE HTML> <html> <h1><center><font color="green">NATURAL</font><font color="pink"> SCENERY</font><font color="blue"> WALLPAPER</font><font color="purple"> FREE</font><font color="yellow"> DOWNLOAD</font></h1></center> <h2>HD NATURE WALLPAPERS</h2> <p><h3><font color="red">Step into peaceful woods, towering mountains, and deserts, all from your desktop! Snag one of Unsplash's beautiful nature wallpapers, free to download for all.</p></h3></font> <center><a href="https://unsplash.com/wallpapers/nature/flower"> <h2>HD FLOWER WALLPAPER</h2> <img src="images/flower.jpg" width="300" height="300"></a></center> <a href="https://unsplash.com/wallpapers/nature/fall"> <h2>HD FA...

Tourism Spots Using HTML |Webpage using HTML|

 Create a Webpage using HTML that has Tourism spots in Tamil Nadu Code: <!DOCTYPE> <html> <body> <h1><center><font color="magenta">TamilNadu Tourism Spots</center></h1></font> <h1><font color="purple">MADURAI</h1></font> <p>Madurai is known as Athens of the East, Madurai is a place of great historical and cultural importance. It is the oldest city in Tamil Nadu and Madurai lies on the banks of the River Vaigai. Madurai is one of the liveliest cities in South India it was originally known as Kadambavanam or the “forest of Kadamba” or the Nauclea kadamba</p> <h2><center>Meenakshi amman temple</h2></center> <a href="https://www.culturalindia.net/indian-temples/meenakshi-temple.html"> <img src="images/meenakshi.jpg" width="450" height="200"></a><br> <p><h2>The goddess Meenakshi is th...

Python Program to develop a calculator |Calculator program in Python|

Image
 Program # Addition def add(a, b):     return a + b #  Subtraction def subtract(x, y):     return x - y #Multiplication def multiply(x, y):     return x * y # Division def divide(x, y):     return x / y print("Calculations performed") print("1.Addition") print("2.Subtraction") print("3.Multiplication") print("4.Division") while True:     choice = input("Enter choice(1/2/3/4): ")     if choice in ('1', '2', '3', '4'):         num1 = float(input("Enter first number: "))         num2 = float(input("Enter second number: "))         if choice == '1':             print(num1, "+", num2, "=", add(num1, num2))         elif choice == '2':             print(num1, "-", num2, "=", subtract(num1, num2))         elif choice == '3':             pr...

HTML Tags |Tags used in HTML|

HTML Tags Tag Description <!--...--> Defines a comment <!DOCTYPE>   Defines the document type <a href> Defines a hyperlink <abbr> Defines an abbreviation or an acronym <acronym> Not supported in HTML5. Use  <abbr>  instead. Defines an acronym <address> Defines contact information for the author/owner of a document <applet> Not supported in HTML5. Use  <embed>  or  <object>  instead. Defines an embedded applet <area> Defines an area inside an image map <article> Defines an article <aside> Defines content aside from the page content <audio> Defines embedded sound content <b> Defines bold text <base> Specifies the base URL/target for all relative URLs in a document <basefont> Not supported in HTML5. Use CSS instead. Specifies a default color, size, and font for all text in a document <bdi> Isolates a part of text that might be formatted in a differe...