Skip to main content

Posts

Showing posts from August, 2014

C program for menu driven calculator

#include<stdio.h> #include<conio.h> float add(float, float); float sub(float, float); float div(float, float); float pro(float, float); float num1, num2, res; char oper, ext='n'; void main(){ clrscr(); while(ext!='Y' && ext!='y'){ printf("\n*****MENU*****\nOperations to perform: +, -, / & *\nEnter Operation: "); oper=getche(); printf("\nEnter two numbers:\n"); scanf("%f%f", &num1, &num2); switch(oper){ case '+': res=add(num1, num2); break; case '-': res=sub(num1, num2); break; case '/': res=div(num1, num2); break; case '*': res=pro(num1, num2); break; default: printf("invalid Operation!\n"); } printf("%f %c %f = %f\n", num1, oper, num2, res); printf("Do you want to exit (Y/N): "); ext=getche(); } } float add(float n1, float n2){ return n1...

Free Web hosting

Looking for a free web hosting site? If you are looking for a free web hosting site which supports PHP & MySQL, you can visit this site called hostinger.com You will get free website builder. You can install over 100 PHP applications for free. You can manage your files with cPanel file manager or with another file manager. You can easily change htaccess file. You can create E-mail accounts with custom mailbox size. You can add upto two domains under free hosting service. You can password protect any important directory. And much more.

Vanilla script

This function gets the cookie specified:- function gcook(cookieName) {         /**          * This variable holds the array of available cookies          */         var cookies = document.cookie.split(";");         cookieName += "=";         for (var i = 0; i < cookies.length; i++) {             var c = cookies[i].trim();             if (c.indexOf(cookieName) == 0) {                 /**                  * This statement retrieves the value of the specified cookie        ...