Showing posts with label Bongaon/ Bangaon. Show all posts
Showing posts with label Bongaon/ Bangaon. Show all posts

Friday, 5 April 2013

Web Server

A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol ( HTTP ), serves the files that form Web pages to Web users (whose computers contain HTTP clients that forward their requests). Every computer on the Internet that contains a Web site must have a Web server program. Two leading Web servers are Apache , the most widely-installed Web server, and Microsoft's Internet Information Server ( IIS ). Other Web servers include Novell's Web Server for users of its NetWare operating system and IBM's family of Lotus Domino servers, primarily for IBM's OS/390 and AS/400 customers.
Web servers often come as part of a larger package of Internet- and intranet-related programs for serving e-mail, downloading requests for File Transfer Protocol ( FTP ) files, and building and publishing Web pages. Considerations in choosing a Web server include how well it works with the operating system and other servers, its ability to handle server-side programming, security characteristics, and publishing, search engine, and site building tools that may come with it.

URL



Definition:                  URL stands for Uniform Resource Locator. A URL is a formatted text string used by Web browsers, email clients and other software to identify a network resource on the Internet. Network resources are files that can be plain Web pages, other text documents, graphics, or programs.
URL strings consist of three parts (substrings):
1.      network protocol
2.       host name or address
3.      file or resource location
These substrings are separated by special characters as follows:
protocol :// host / location
URL Protocol
The 'protocol' substring defines a network protocol to be used to access a resource. These strings are short names followed by the three characters '://' (a simple naming convention to denote a protocol definition). Typical URL protocols include http://, ftp://, and mailto://.
URL Host
The 'host' substring identifies a computer or other network device. Hosts come from standard Internet databases such as DNS and can be names or IP addresses. For example, compnetworking.about.com is the host for this Web page.
URL Location
The 'location' substring contains a path to one specific network resource on the host. Resources are normally located in a host directory or folder. For example, /od/internetaccessbestuses/bldef-url.htm is the location of this Web page including two subdirectories and the file name.
When the location element is omitted such as in http://compnetworking.about.com/, the URL conventionally points to the root directory of the host and often a home page (like 'index.htm').
Absolute vs. Relative URLs
Full URLs featuring all three substrings are called absolute URLs. In some cases such as within Web pages, URLs can contain only the one location element. These are called relative URLs. Relative URLs are used for efficiency by Web servers and a few other programs when they already know the correct URL protocol and host.

Virtual Circuit



Virtual circuit switching is a packet switching methodology whereby a path is established between the source and the final destination through which all the packets will be routed during a call. This path is called a virtual circuit because to the user, the connection appears to be a dedicated physical circuit. However, other communications may also be sharing the parts of the same path.
Before the data transfer begins, the source and destination identify a suitable path for the virtual circuit. All intermediate nodes between the two points put an entry of the routing in their routing table for the call. Additional parameters, such as the maximum packet size, are also exchanged between the source and the destination during call setup. The virtual circuit is cleared after the data transfer is completed.
Virtual circuit packet switching is connection orientated. This is in contrast to datagram switching, which is a connection less packet switching methodology.
Advantages of virtual circuit switching are:
·         Packets are delivered in order, since they all take the same route;
·         The overhead in the packets is smaller, since there is no need for each packet to contain the full address;
  • The connection is more reliable, network resources are allocated at call setup so that even during times of congestion, provided that a call has been setup, the subsequent packets should get through;
  • Billing is easier, since billing records need only be generated per call and not per packet.
Disadvantages of a virtual circuit switched network are:
  • The switching equipment needs to be more powerful, since each switch needs to store details of all the calls that are passing through it and to allocate capacity for any traffic that each call could generate;
  • Resilience to the loss of a trunk is more difficult, since if there is a failure all the calls must be dynamically reestablished over a different route.
Examples of virtual circuit switching are X.25 and Frame Relay.

ADSL

Commonly simplified as DSL, Asymmetric Digital Subscriber Line (ADSL) is technology for high-speed Internet access. It uses existing copper telephone lines to send and receive data at speeds that far exceed conventional dial-up modems, while still allowing users to talk on the phone while they surf. By contrast, DSL is typically not as fast as cable Internet access. It is generally well-suited for moderate gaming, computer-aided design, streaming multimedia, and downloading large files.
ADSL Speed:
The fastest dial-up modems are rated at 56 kilobits per second (Kbps), and usually operate at about 53 Kbps under good conditions. By comparison, ADSL allows download speeds from 1.5 to 8 megabits per second (Mbps), depending on the grade of DSL service purchased. Cable Internet is capable of supporting up to 30 Mbps.
How Does ADSL Work?
ADSL uses standard telephone lines to upload and download data on a digital frequency, which sets these datastreams apart from the analog signals that telephones and fax machines use. The telephone can be used at the same time when surfing the Web with DSL service because the signal is operating on a different frequency; this is not true of conventional dial-up Internet access. It may be necessary to install inexpensive filters on each phone or fax line to remove any "white noise" on the line that might be generated from the DSL signals.
A compatible Internet service provider (ISP) is necessary to receive DSL service, as is a DSL modem. The modem may be provided by the ISP, or it may be purchased separately by the end-user. Most US-based ISPs that offer DSL service require subscriber contracts of at least one year. DSL is usually more expensive than dial-up service, but the latter is slowly becoming obsolete as user bandwidth requirements rise, due to things like streaming video.
DSL is an "always on" service, meaning that as long as the user's computer is powered on, it will automatically stay connected to the Internet unless it is manually disconnected via software or hardware. Family members can share DSL accounts, with a basic monthly fee. Unlike dial-up service, which stipulates that only one session be open at a time, multiple members can be using DSL service at the same time on various computers in the house. A router may also be used with this type of ISP to provide wireless access throughout a home.
Asymmetric vs. Symmetric
The "asymmetric" in ADSL refers to the fact that the speed at which data is downloaded, the data coming to the end-user's computer from the Internet, is faster than the rate for uploaded data, the data traveling from the user's computer to the Internet. The speed of uploading data is slower because Web page requests are fairly small data strings that do not require much bandwidth to handle efficiently. Consequently, more speed can be dedicated to downloading more bandwidth-intensive data.
Some businesses may require matching rates for uploading large files. For them, Symmetric Digital Subscriber Line (SDSL) is an option. "Symmetric" indicates that both datastreams are operating at the same speed of 1.5 to 7 Mbps, depending on the grade of service purchased. SDSL service requires a dedicated telephone line, however, because unlike ADSL, telephone and fax services cannot share a line with this service.
Availability
ADSL is not accessible to all communities, and coverage is often especially spotty in rural areas. Dedicated DSL providers, or even the local phone company, can verify if service is available in a specific locale. Speeds will vary depending upon the physical distance from local hubs, as well as the number of people using the service at one time in the same area.
Some customers who live close to an ISP hub may be able to take advantage of newer varieties of ADSL, called ADSL2 and ADSL2+, which have even greater throughput rates, from 12 to 24 Mbps for downloading and 1 to 3.5 Mbps for uploading. In addition, there are other types of DSL that offer customers other benefits. Rate Adaptive DSL (RADSL) uses a special modem that can adapt to changing line conditions, changing the speed as needed. Very high bit-rate DSL (VDSL) offers download speeds of up to 52 Mbps, but is not as widely available and is only able to achieve such high speeds very close to a hub.
Is DSL Ever as Fast as Cable?
Under identical conditions, cable has a strong speed advantage over ADSL; however, identical conditions rarely exist. In a given locale, cable speeds can suffer if they are too far from the nearest hub, or may suffer a bottle-neck if too many users are online at once. Artificial bandwidth caps placed on service at times of heaviest usage are not uncommon either. While the same factors are true of DSL, it does mean that in certain markets, some DSL providers may actually be able to provide faster service than some cable providers — especially if newer technologies like VDSL are available. As a result, whether DSL is as fast as cable is not always obvious, and it is a good idea for people looking for an ISP to research the local market and read customer reviews before committing to a particular provider.

FTP

Definition: FTP allows you to transfer files between two computers on the Internet. FTP is a simple network protocol based on Internet Protocol and also a term used when referring to the process of copying files when using FTP technology.
To transfer files with FTP, you use a program often called the "client." The FTP client program initiates a connection to a remote computer running FTP "server" software. After the connection is established, the client can choose to send and/or receive copies of files, singly or in groups. To connect to an FTP server, a client requires a username and password as set by the administrator of the server. Many public FTP archives follow a special convention for that accepts a username of "anonymous."
Simple FTP clients are included with most network operating systems, but most of these clients (such as FTP.EXE on Windows) support a relatively unfriendly command-line interface. Many alternative freeware / shareware third-party FTP clients have been developed that support graphic user interfaces (GUIs) and additional convenience features. In any FTP interface, clients identify the FTP server either by its IP address (such as 192.168.0.1) or by its host name (such as ftp.about.com).
FTP supports two modes of data transfer: plain text (ASCII), and binary. You set the mode in the FTP client. A common error when using FTP is attempting to transfer a binary file (such as a program or music file) while in text mode, causing the transfered file to be unusable.

E-mail

Short for electronic mail, the transmission of messages over communications networks. The messages can be notes entered from the keyboard or electronic files stored on disk. Most mainframes, minicomputers, and computer networks have an e-mail system. Some electronic-mail systems are confined to a single computer system or network, but others have gateways to other computer systems, enabling users to send electronic mail anywhere in the world. Companies that are fully computerized make extensive use of e-mail because it is fast, flexible, and reliable.
Most e-mail systems include a rudimentary text editor for composing messages, but many allow you to edit your messages using any editor you want. You then send the message to the recipient by specifying the recipient's address. You can also send the same message to several users at once. This is called broadcasting.
Sent messages are stored in electronic mailboxes until the recipient fetches them. To see if you have any mail, you may have to check your electronic mailbox periodically, although many systems alert you when mail is received. After reading your mail, you can store it in a text file, forward it to other users, or delete it. Copies of memos can be printed out on a printer if you want a paper copy.
All online services and Internet Service Providers (ISPs) offer e-mail, and most also support gateways so that you can exchange mail with users of other systems. Usually, it takes only a few seconds or minutes for mail to arrive at its destination. This is a particularly effective way to communicate with a group because you can broadcast a message or document to everyone in the group at once.
Although different e-mail systems use different formats, there are some emerging standards that are making it possible for users on all systems to exchange messages. In the PC world, an important e-mail standard is MAPI. The CCITT standards organization has developed the X.400 standard, which attempts to provide a universal way of addressing messages. To date, though, the de facto addressing standard is the one used by the Internet system because almost all e-mail systems have an Internet gateway.

A.M & F.M Radio

Definition of Radio:
Radio is "wireless telegraphy or telephony: speeches broadcast by radio." However "radio" describes the tool with which we receive this wireless transmission. Radio means anything associated with radio waves.
History of Radio:
In 1906 some folks aboard a ship who where used to hearing the blips and bleeps of Morse code all day and transcribing it down were treated to a special surprise. They heard over their transmissions the sound of a violin--it was Christmas Eve so the violin was playing "Silent Night." It was magical then, but the idea of creating a public medium out of the ingenious invention came a whole decade later with Frank Conrad who began playing records for his friends over the air, thus radio as we know it was born.
How It Works:Radio waves can bounce around all they want, but no one is going to hear or "intercept" them without a receiver. A radio wave is transmitted from a station's giant transmitter, and these waves go out into the air, in all directions. Your radio antenna, whether external or built into your AM/FM radio, picks up pieces of this wave. The waves don't actually transmit sounds--they carry electronic pulses, and your radio translates these pulses into sound, but all before you can blink your eyes a few times.
FM Radio Vs. AM Radio:
AM (amplitude modulation) and FM (frequency modulation) radio are the same kind of radio wave. They originate as the exact same radio wave, and are encrypted or "modulated" differently. FM radio has a strong advantage over AM radio because it is less likely to have static from fluctuations in signal due to changes in amplitude. FM radio ignores these fluctuations, producing less static, which provides for a better listening experience.
The Physics:
When you listen to your radio you are hearing the movement of atoms. When a radio signal is sent it is made up of lots of atoms that have dispersed from the transmitter antenna to the air. These atoms then travel at light speed in all directions until they reach a radio antenna. Radio transmission may seem like sound just bouncing around in the air, but it's actually a transfer of physical matter.

DNS

Definition: The DNS translates Internet domain and host names to IP addresses. DNS automatically converts the names we type in our Web browser address bar to the IP addresses of Web servers hosting those sites.
DNS implements a distributed database to store this name and address information for all public hosts on the Internet. DNS assumes IP addresses do not change (are statically assigned rather than dynamically assigned).
The DNS database resides on a hierarchy of special database servers. When clients like Web browsers issue requests involving Internet host names, a piece of software called the DNS resolver (usually built into the network operating system) first contacts a DNS server to determine the server's IP address. If the DNS server does not contain the needed mapping, it will in turn forward the request to a different DNS server at the next higher level in the hierarchy. After potentially several forwarding and delegation messages are sent within the DNS hierarchy, the IP address for the given host eventually arrives at the resolver, that in turn completes the request over Internet Protocol.
DNS additionally includes support for caching requests and for redundancy. Most network operating systems support configuration of primary, secondary, and tertiary DNS servers, each of which can service initial requests from clients. Internet Service Providers (ISPs) maintain their own DNS servers and use DHCP to automatically configure clients, relieving most home users of the burden of DNS configuration.

Routers

Definition: Routers are small physical devices that join multiple networks together. Technically, a router is a Layer 3 gateway device, meaning that it connects two or more networks and that the router operates at the network layer of the OSI model.
Home networks typically use a wireless or wired Internet Protocol (IP) router, IP being the most common OSI network layer protocol. An IP router such as a DSL or cable modem broadband router joins the home's local area network (LAN) to the wide-area network (WAN) of the Internet.
By maintaining configuration information in a piece of storage called the routing table, wired or wireless routers also have the ability to filter traffic, either incoming or outgoing, based on the IP addresses of senders and receivers. Some routers allow a network administrator to update the routing table from a Web browser interface. Broadband routers combine the functions of a router with those of a network switch and a firewall in a single unit.

Peer to Peer Network

2.    Peer to Peer Network [2012]:
In its simplest form, a peer-to-peer (P2P) network is created when two or more PCs are connected and share resources without going through a separate server computer. A P2P network can be an ad hoc connection—a couple of computers connected via a Universal Serial Bus to transfer files. A P2P network also can be a permanent infrastructure that links a half-dozen computers in a small office over copper wires. Or a P2P network can be a network on a much grander scale in which special protocols and applications set up direct relationships among users over the Internet.
The initial use of P2P networks in business followed the deployment in the early 1980s of free-standing PCs. In contrast to the minimainframes of the day, such as the VS system from Wang Laboratories Inc., which served up word processing and other applications to dumb terminals from a central computer and stored files on a central hard drive, the then-new PCs had self-contained hard drives and built-in CPUs. The smart boxes also had onboard applications, which meant they could be deployed to desktops and be useful without an umbilical cord linking them to a mainframe.
Many workers felt liberated by having dedicated PCs on their desktops. But soon they needed a way to share files and printers. The obvious solution was to save files to a floppy disk and carry the disk to the intended recipient or send it by interoffice mail.
Sneaker Nets
That practice resulted in the term "sneaker net." The most frequent endpoint of a typical sneaker net was the worker who had a printer connected to his machine.
While sneaker nets seemed an odd mix of the newest technology and the oldest form of transportation, the model is really the basis for today's small P2P workgroups.
Whereas earlier centralized computing models and today's client/server systems are generally considered controlled environments in which individuals use their PCs in ways determined by a higher authority, a classic P2P workgroup network is all about openly sharing files and devices.
In general, office and home P2P networks operate over Ethernet (10M bit/sec.) or Fast Ethernet (100M bit/sec.) and employ a hub-and-spoke topology. Category 5 (twisted-pair) copper wire runs among the PCs and an Ethernet hub or switch, enabling users of those networked PCs access to one another's hard drives, printers or perhaps a shared Internet connection.

Both Client and Server
In effect, every connected PC is at once a server and a client. There's no special network operating system residing on a robust machine that supports special server-side applications like directory services (specialized databases that control who has access to what).
In a P2P environment, access rights are governed by setting sharing permissions on individual machines.
For example, if User A's PC is connected to a printer that User B wants to access, User A must set his machine to allow (share) access to the printer. Similarly, if User B wants to have access to a folder or file, or even a complete hard drive, on User A's PC, User A must enable file sharing on his PC. Access to folders and printers on an office P2P network can be further controlled by assigning passwords to those resources.

Navigating a P2P Network
This diagram shows how a P2P network operates. The solid lines indicate physical, hard-wired network cables. The dotted lines indicate that each PC can communicate and share files with every other PC on such a network. A printer attached to one PC can be  used by other PCs on the network—if that printer’s PC allows such use.          

CHANNEL CAPACITY



1.     CHANNEL CAPACITY:
We have seen that there are a variety of impairments that distort or corrupt a signal. For digital data, the question that then arises is to what extent these impairments limit the data rate that can be achieved. The maximum rate at which data can be transmitted over a given communication path, or channel, under given conditions, is referred to as the channel capacity.
There are four concepts here that we are trying to relate to one another.
• Data rate: The rate, in bits per second (bps), at which data can be communicated
• Bandwidth: The bandwidth of the transmitted signal as constrained by the transmitter and the nature of the transmission medium, expressed in cycles per second, or Hertz
• Noise: The average level of noise over the communications path
• Error rate: The rate at which errors occur, where an error is the reception of a 1 when a 0 was transmitted or the reception of a 0 when a 1 was transmitted The problem we are addressing is this: Communications facilities are expensive and, in general, the greater the bandwidth of a facility, the greater the cost. Furthermore, all transmission channels of any practical interest are of limited bandwidth. The limitations arise from the physical properties of the transmission medium or from deliberate limitations at the transmitter on the bandwidth to prevent interference from other sources. Accordingly, we would like to make as efficient use as possible of a given bandwidth. For digital data, this means that we would like to get as high a data rate as possible at a particular limit of error rate for a given bandwidth. The main constraint on achieving this efficiency is noise.

Optical Fiber

Optical Fiber

Physical Description An optical fiber is a thin (2 to125 mm ), flexible medium capable of guiding an optical ray.Various glasses and plastics can be used to make optical fibers. The lowest losses have been obtained using fibers of ultra pure fused silica. Ultrapure fiber is difficult to manufacture; higher loss multi-component glass fibers are more economical and still provide good performance. Plastic fiber is even less costly and can be used for short haul links, for which moderately high losses are acceptable.
An optical fiber cable has a cylindrical shape and consists of three concentric sections: the core, the cladding, and the jacket (Figure 4.2c). The core is the inner most section and consists of one or more very thin strands, or fibers, made of glass or plastic; the core has a diameter in the range of 8 to Each fiber is surrounded by its own cladding, a glass or plastic coating that has optical properties different
from those of the core and a diameter of The interface between the core
and cladding acts as a reflector to confine light that would otherwise escape the
core. The outermost layer, surrounding one or a bundle of cladded fibers, is the
jacket. The jacket is composed of plastic and other material layered to protect
against moisture, abrasion, crushing, and other environmental dangers.
Applications Optical fiber already enjoys considerable use in long
distance
telecommunications, and its use in military applications is growing. The continuing
improvements in performance and decline in prices, together with the inherent
advantages of optical fiber, have made it increasingly attractive for local area net
working. The following characteristics distinguish optical fiber from twisted pair or
coaxial cable:
• Greater capacity: The potential bandwidth, and hence data rate, of optical
fiber is immense; data rates of hundreds of Gbps over tens of kilometers have
been demonstrated. Compare this to the practical maximum of hundreds of
Mbps over about 1 km for coaxial cable and just a few Mbps over 1 km or up
to 100 Mbps to 10 Gbps over a few tens of meters for twisted pair.
• Smaller size and lighter weight: Optical fibers are considerably thinner than
coaxial cable or bundled twisted
pair cable—at least an order of magnitude
thinner for comparable information transmission capacity. For cramped con
duits in buildings and underground along public rights
of
way, the advantage
of small size is considerable. The corresponding reduction in weight reduces
structural support requirements.
• Lower attenuation: Attenuation is significantly lower for optical fiber than for
coaxial cable or twisted pair (Figure 4.3c) and is constant over a wide range.
• Electromagnetic isolation: Optical fiber systems are not affected by external
electromagnetic fields. Thus the system is not vulnerable to interference,
impulse noise, or crosstalk.By the same token, fibers do not radiate energy, so
there is little interference with other equipment and there is a high degree of
security from eavesdropping. In addition, fiber is inherently difficult to tap.
• Greater repeater spacing: Fewer repeaters mean lower cost and fewer sources
of error. The performance of optical fiber systems from this point of view has
been steadily improving. Repeater spacing in the tens of kilometers for optical
fiber is common, and repeater spacings of hundreds of kilometers have been
demonstrated. Coaxial and twisted
pair systems generally have repeaters
every few kilometers.

Coaxial Cable

Coaxial Cable
 
Physical Description: Coaxial cable, like twisted pair, consists of two conductors, but is constructed differently to permit it to operate over a wider range of frequencies. It consists of a hollow outer cylindrical conductor that surrounds a single inner wire conductor (Figure 4.2b). The inner conductor is held in place by either regularly spaced insulating rings or a solid dielectric material. The outer conductor is covered with a jacket or shield. A single coaxial cable has a diameter of from 1 to 2.5 cm. Coaxial cable can be used over longer distances and support more stations on a shared line than twisted pair.

Applications: Coaxial cable is a versatile transmission medium, used in a wide variety of applications.The most important of these are
• Television distribution
• Long distance telephone transmission
• Short run computer system links
• Local area networks
Coaxial cable is widely used as a means of distributing TV signals to individual homes—cable TV. From its modest beginnings as Community Antenna Television (CATV), designed to provide service to remote areas, cable TV reaches almost as many homes and offices as the telephone. A cable TV system can carry dozens or even hundreds of TV channels at ranges up to a few tens of kilometers.
            Coaxial cable has traditionally been an important part of the long distance telephone network.Today, it faces increasing competition from optical fiber, terrestrial microwave, and satellite. Using frequency division multiplexing (FDM, see Chapter 8), a coaxial cable can carry over 10,000 voice channels simultaneously.
            Coaxial cable is also commonly used for short range connections between devices. Using digital signaling, coaxial cable can be used to provide high speed I/O channels on computer systems.
 
Transmission Characteristics: Coaxial cable is used to transmit both analog and digital signals. As can be seen from Figure 4.3b, coaxial cable has frequency characteristics that are superior to those of twisted pair and can hence be used effectively at higher frequencies and data rates. Because of its shielded, concentric construction, coaxial cable is much less susceptible to interference and crosstalk than twisted pair. The principal constraints on performance are attenuation, thermal noise, and intermodulation noise. The latter is present only when several channels (FDM) or frequency bands are in use on the cable.
             For long distance transmission of analog signals, amplifiers are needed every few kilometers,with closer spacing required if higher frequencies are used.The usable spectrum for analog signaling extends to about 500 MHz.For digital signaling, repeaters are needed every kilometer or so,with closer spacing needed for higher data rates.

Thursday, 14 March 2013

Write a program to find the G.C.D of two numbers.

Statement:
Write a program to find the GCD of two numbers.



 Algorithm:

            Step-1: Read two numbers a,b
            Step-2: if (a>b)
                        Max=a, Min=b
            Step-3: Else,
                Max=b, Min=a
            Step-4: c=Max%Min
            Step-5: while(c!=0)
                       1.    Max=Min
                       2.    Min=c
                       3.    C=Max%Min
            Step-6: Print Min (GCD)
            Step-7: End
   


Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,max,min;
printf("Enter the two numbers:");
scanf("%d%d",&a,&b);
if(a>b)
{
max=a;
min=b;
}
else
{
max=b;
min=a;
}
c=max%min;
while(c!=0)
{
max=min;
min=c;
c=max%min;
}
printf("The GCD of given two numbers is=%d", min);
getch();
}



Output:
Enter the two numbers: 56
42
The GCD of given two numbers is= 14


Discussion:
I.    It works properly.
II.    The GCD can be made fo more than two numbers.
III.    Since we use short signed int so it works within the number range  -32768  to +32767
IV.    If we use long int then it works within the number range  -2147483648  to  +2147483647

Write a program to calculate the interest of the loan.

 Statement:
            Write a program to calculate the interest of the loan.



Algorithm:
            Step-1: Read a (Amount of Rs)
            Step-2: Read i (Percentage of interest)
            Step-3: Read y (No of year)
            Step-4: e=a*i*y (Total interest)
            Step-5: t=e + a(Total amount of Rs.)
            Step-6: print e, t
            Step-7: End
       



Program Listing:

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float a,i,t,y,e;
printf("\nAmount of Rs=");
scanf("%f",&a);
printf("\nPercentage of interest =");
scanf("%f",&i);
printf("\nNo of year=");
scanf("%f",&y);
e=a*i*y/100;
t=e+a;
printf("\nTotal interest=%f",e);
printf("\n\nTotal amount you get after %f year is= %f Rs" ,y,t);
getch();
}




Output:
Amount of Rs=1000
Percentage of interest = 13
No of year=5
Total amount you get after 5 year is= 650 Rs
Total amount you get after 5 year is= 1650 Rs
   
Discussion:
           I.    It works within the number range -32767 to 32767
          II.    If we use long integer then it works in more than range.
         III.    It works in negative number.