-->

Facebook

Jasper Roberts - Blog

Wednesday, February 24, 2016

(IS2) Write a Program to implement-MODIFIED CEASER CIPHER

#include<stdio.h>
#include<conio.h>
void main()
{
            int i,no,c;
            char om[30],em[30];
            clrscr();
            printf("Enter Original Text: ");
            gets(om);
            printf("Enter Key No: ");
            scanf("%d",&no);
            c=no/26;
            if(no>26)
                        no=no-(c*26);
            for(i=0;om[i]!=NULL;i++)
            {
                        if(om[i]==' ')
                        {
                                    em[i]=' ';
                        }
                        else if(om[i]>='a' && om[i]<='z')
                        {
                                    em[i]=om[i]+no;
                                    if(em[i]>'z' || em[i]<0)
                                    {
                                                em[i]=em[i]-26;
                                    }
                        }
                        else
                        {
                                    em[i]=om[i]+no;
                                    if(em[i]>'Z')
                                    {
                                                em[i]=em[i]-26;
                                    }
                        }
            }
            em[i]=NULL;
            printf("\n Your Original Text = %s ",om);
            printf("\n Enter Encrypted Text = %s ",em);
            getch();

}


OUTPUT:

is programs

(IS1) - Write a Program to implement - CAESER CIPHER.

#include<stdio.h>
#include<conio.h>
void main()
{
            int i;
            char om[30],em[30];
            clrscr();
            printf("Enter Original Text: ");
            gets(om);
            for(i=0;om[i]!=NULL;i++)
            {
                        if(om[i]==' ')
                        {
                                    em[i]=' ';
                        }
                        else if(om[i]>='a' && om[i]<='z')
                        {
                                    em[i]=om[i]+3;
                                    if(em[i]>'z')
                                    {
                                                em[i]=em[i]-26;
                                    }
                        }
                        else
                        {
                                    em[i]=om[i]+3;
                                    if(em[i]>'Z')
                                    {
                                                em[i]=em[i]-26;
                                    }
                        }
            }
            em[i]=NULL;
            printf("\n Your Original Text = %s ",om);
            printf("\n Enter Encrypted Text = %s ",em);
            getch();
}




OUTPUT:
program to implement caeser cipher

Tuesday, February 23, 2016

2. Create web pages to illustrate text formatting tags

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>text formating</title>
</head>
<body>
<h1>This is Header1</h1>
<h2>This is Header2</h2>
<h3>This is Header3</h3>
<h4>This is Header4</h4>
<h5>This is Header5</h5>
<h6>This is Header6</h6>
<p>This is Paragraph</p>
<pre> This is pre formated text in html. it display text as it coped.</pre>
</body>

</html>

Output:


1. Write a html program to print "hello world"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>hello world</title>
</head>

<body>
<h1 style="color:#FF0000"> Hello World </h1>
</body>

</html>

Output:

CPU 2110003 GTU Question Paper 30/12/2015

GTU CPU Question Paper - Exam Date: 30/12/2015 Click Here