Thursday 27 May 2021

Button effect CSS

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Button effect</title>
    <style>
        .container {
            width900px;
            border3px solid black;
            margin15px auto;
            padding5px 10px;
            background-colorrgb(248236236);
        }

        a {
            text-decorationnone;
            colorwhite;

        }

        a:hover {
            coloryellow;
        }

        a:active {
            background-colorgreen;
        }

        a:visited {
            background-colorindigo;
        }

        .btn {
            border2px solid black;
            border-radius3px;
            cursorpointer;
            background-colorred;
            padding5px;
            font-size12px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans''Helvetica Neue'sans-serif;
            colorwhite;
        }

        .btn:hover {
            coloryellow;
            border3px solid black;
        }

        .btn:active {
            background-colorgreen;
        }
    </style>
</head>

<body>
    <div class="container">
        <h2>This is my frist blog</h2>
        <p id="containerpara" class="para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum illum laborum,
            officiis neque alias necessitatibus saepe eius quidem. Ipsam exercitationem sit obcaecati quas consequatur
            similique recusandae veniam, dolor doloremque tenetur illo fugit error nihil?</p>
        <a href="Https://Linkedin.com " target="_blank" class="btn">Read more</a>
        <button class="btn">Next</button>

    </div>
</body>

</html>

Alignment in CSS

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>float and basic web </title>
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&family=Slabo+27px&display=swap"
        rel="stylesheet">
    <style>
        body {
            font-family'Dancing Script', cursive;
            font-family'Slabo 27px'serif;
        }

        * {
            box-sizingborder-box;

        }

        .container {
            width900px;
            border3px solid rgb(214177177);
            background-colorwhite;
            margin30px auto;

        }

        .items {
            border2px solid black;
            background-colorrgb(203203236);
            margin12px 3px;
            padding12px 3px;

        }

        #fruits {
            floatleft;
            width48%;

        }

        #computers {
            floatright;
            width48%;

        }

        #vegetables {
            clearboth;

        }

        p,
        h2 {
            text-alignright;
            text-alignleft;
            text-aligncenter;
            text-alignjustify;
            text-aligncenter;

        }

        h1 {

            text-aligncenter;
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>Welcome To My Store</h1>
        <div id="fruits" class="items">
            <h2>Fruits</h2>
            <p id="fruitspara" class="para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit iste eveniet
                laudantium non doloribus quae consequatur nisi? Quaerat consequuntur natus deserunt repellendus magni
                debitis commodi suscipit tempore ut, maxime, autem asperiores vitae unde. Quod.
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident error eaque ex laborum. Voluptate
                enim officia labore delectus velit animi consequatur laborum placeat. Molestiae sint nobis eius
                exercitationem mollitia obcaecati.
            </p>
        </div>
        <div id="computers" class="items">
            <h2>Computer</h2>
            <p id="computerspara" class="para">Lorem ipsum dolor sit amet consectetur adipisicing elit. Pariatur
                reiciendis amet voluptatem, iure voluptates sit dolor facilis dolore ab neque dignissimos explicabo
                quisquam hic placeat quis voluptas voluptate. Quas eius libero quisquam voluptatum doloribus. Lorem
                ipsum dolor sit, amet consectetur adipisicing elit. Sapiente enim autem distinctio, amet quae at
                pariatur alias nobis fugiat mollitia consequuntur assumenda necessitatibus vel, minus voluptate earum
                labore rem ut?</p>
        </div>
        <div id="vegetables" class="items">
            <h2>Vegetables</h2>
            <p id="vegetablespara" class="para">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis sint
                dolorum dolore repellendus. Accusamus, accusantium? Maiores dolorum sit praesentium eum ab minus optio
                expedita eaque exercitationem necessitatibus incidunt, ipsa molestias ipsam illum consectetur ut!</p>
        </div>
        <div id="glasses" class="items">
            <h2>Glasses</h2>
            <p id="glassespara" class="para">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis sint dolorum
                dolore repellendus. Accusamus, accusantium? Maiores dolorum sit praesentium eum ab minus optio expedita
                eaque exercitationem necessitatibus incidunt, ipsa molestias ipsam illum consectetur ut!</p>
        </div>
    </div>
</body>

</html>

Developer Tools

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Developer Tools</title>
    <link rel="stylesheet" href="tut16.css">
</head>
<body>
    <h1>Developer Tools</h1>
    <p class="bgyellow">This is my frist ever para in chrome</p>
    

    
</body>
</html>

CMD tips

 

CMD Training 

/outside 

inside -\


Directory is the location for storage of 

file in hierachial format.


To navigate to your home directory, use "cd" or

 "cd ~" To navigate up one directory level, use "cd .." To navigate to the previous directory (or back), 

use "cd -" To navigate into the root directory, use "cd /"


make dir = mkdir 

remove dir = rmdir


if there is folders inside directory

then 

How to delete

rmdir /s folder names


path variables is just a shortcut in CMD 


wmic logicaldisk get name 

disk nmaes 



del - delete


type - print 



dir > abc.text


echo hrllo > shs.text

echo ducduc >> shs1.text

type text


dir e: cuurent doesn't affect


C problems

 

// write a program to find any number raise power
//author: Upendra Date:10/27/2020
#include <math.h>
void main()
{
    int abn;
    printf("Enter the two number to get power:\n");
    scanf("%d%d", &b, &n);
    a = pow(bn);
    printf("Answer is %d"a);
}


/*write a program to print all
even number from 1 to 100*/
#include<stdio.h>
void main()
{
int n=1;
for(n=1;n-->=1&&n--<=100)
printf("%d\n",n);
}


/* write a program to print
alphabet from a to z*/
#include<stdio.h>
void main()
{
char ch='A';
while(ch<='Z')
{
printf("%c\n",ch);
ch++;}
}


// rectangle
#include <stdio.h>
int main()
{

    int a = 32;
    int b = 32;
    printf("area of rectangle is a*b is %d"a * b);
    return 0;
}


// rectangle
# include<stdio.h>
int main(){

int a;
int b;
int c;
printf("length of rec is a:");
scanf("%d",&a);
printf("breadth of rec is b:");
scanf("%d",&b);
c=a*b;
printf("area of rectangle is a*b is %d",c);
return 0;



}


// area of circle
# include<stdio.h>
int main(){

float r,a;
printf("Radius of a circle is r:");
scanf("%f",&r);
printf("area of circle is %f",r*r);
return 0;


}


// volume of cylinders
# include<stdio.h>
main(){
float v,r,h; // v- volume , pi- 3.14, r-radius,h-height
float pi=3.14;
printf("Enter the radius of cyclinders:");
scanf("%f",&r);
printf("Enter the height of cyclinders:");
scanf("%f",&h);
v=pi*(r*r)*h;
printf("Volume of a cyclinder is %f",v);



}

# include<stdio.h>
main(){
float c,f; // c - celsius, f- fahreint
printf("Enter the temperature in celsius:");
scanf("%f",&c);
f=(c*9/5)+32;
printf("temperature in faherient is %f",f);

}


// find the final amount in simple interest of shaam
# include<stdio.h>
main(){
float Si,p,r,Total_Amount; // simple inters, principle , rate of interest, time of year
int t;
printf("Enter the principle amount:");
scanf("%f",&p);
printf("Enter the rate of  interest:");
scanf("%f",&r);
printf("Enter the time in year:");
scanf("%d",&t);
Si=(p*r*t)/100;
printf("Simple interest of shaamu is %f \n\n",Si);
Total_Amount=p+Si;
printf("Total Amount after %d year is %f",t,Total_Amount);



}


#include <stdio.h>

int main()
{
    int a = 16, c, u, b;
    a = c = u = b;
    printf("The value of a is %d \n", c);
    printf("The value of a is %d", u);
}


#include <stdio.h>

int main()
{
   int marks1,marks2,marks3,Total_marks;
   printf("Enter the marks of each subject:\n ");
   scanf("%d%d%d \n",&marks1,&marks2,&marks3);
   Total_marks=(marks1+marks2+marks3)/3*3;
   printf("Total_marks of Student is %d \n",Total_marks);
   if ((marks1>=33&&marks2>=33&&marks3>=33)&&(Total_marks>=40))
   {
       printf("You are passed CongraT!");
   }
   else
   {
    printf("You are Fail");
   }




    return 0;
}



// create a program to add and sub and multi and divide two number
# include<stdio.h>

int main(){

int a = 25;
int b= 30;
int c ;
c = a+b;
printf("Sum of a and b is %d",c);
return 0;

}



// write a program to find area of retangle using

# include<stdio.h>

int main(){

int l,b,a; // area of rectangle
printf("length of rectangle is :");
scanf("%d",&l);
printf("breadth of rectangle is :");
scanf("%d",&b);
a=l*b;
printf("area of rec is %d",a);
return 0;



}



#include<stdio.h>
int main()
{
int i,j,rows; // N is no. of rows
printf("Enter the no.of rows:\n");
scanf("%d",&rows);
for(i=1;i<=rows;i++)
{
for(j=1;j<=rows-i;j++)
{
printf(" ");}

for(j=1;j<=(2*i-1);j++)
{
if(j==1||i==rows||j==(2*i-1))

printf("*");
else
{
    printf(" ");
}
}

printf("\n");

}











}


/**
 * C program to print equilateral triangle or pyramid star pattern
 */

#include <stdio.h>

int main()
{
    int i, j, rows;

    /* Input number of rows to print */
    printf("Enter number of rows : ");
    scanf("%d", &rows);

    /* Iterate through rows */
    for(i=1; i<=rows; i++)
    {
        /* Print leading spaces */
        for(j=i; j<rows; j++)
        {
            printf(" ");
        }

        /* Print star */
        for(j=1; j<=(2*i-1); j++)
        {
            printf("*");
        }

        /* Move to next line */
        printf("\n");
    }

    return 0;
}



// write  a program to print pyramid pattern in c
#include <stdio.h>
int main()
{
    int ijN// N is no of input row
    printf("Enter the input row:\n");
    scanf("%d", &N);
    for (i = 1i <= Ni++)
    {
        for (j = 1j < Nj++)
        {
            printf(" ");
        }

        for (j = 1j <= (2 * i - 1); j++)
        {
            printf("*");
        }

        printf("\n");
    }
}


// write a program to draw pyramid using star pattern
#include <stdio.h>
int main()
{
    int ijNM// N is a row input and M is a col
    printf("Enter the input rows and col");
    scanf("%d%d", &N, &M);
    for (i = 1i <= Ni++)
    {
        for (j = 1j <= Mj++)
        {
            printf("*");
        }

        printf("\n");
    }
}



// write a program to find area of retangle using

# include<stdio.h>

int main(){

int l,b,a; // area of rectangle
printf("length of rectangle is :");
scanf("%d",&l);
printf("breadth of rectangle is :");
scanf("%d",&b);
a=l*b;
printf("area of rec is %d",a);
return 0;



}



// write a program to build a structure like of black square emoji
#include<stdio.h>
int main()
{
int i,j,N//ith row ,jth column,N is a no. of rows
printf("Enter the no. of rows:\n");
scanf("%d",&N);
for(i=1;i<=N;i++)
{
for(j=1;j<=N;j++)
{
if(i==1||i==N||j==1||i==N-5||i==5||j==5)
printf("*");
else
{
printf(" ");
}

}

printf("\n");

}
}

C Problems

 

#include<stdio.h>
void main()
{
int n;
for(n=0;n<=0;n--)
printf("system is hacked %d\n",n);
}


// write a program to write a simple interest simply formula to calculate it
#include <stdio.h>
void main()
{
    int prinnoy// prin-principle amount,noy-number of year
    float roisi// roi-rate of interest,si-simple interest
    printf("enter the prin amount,roi,noy:\n");
    scanf("%d%d%f", &prin, &noy, &roi);
    si = (prin * (roi / 100) * noy) / 100;
    printf("Simple Interest is %f"si);
}


/* shortest program to print 1 to 10
*/
#include<stdio.h>
void main()
{int a;
for(a=0;a++>=0&&a++<11;a++)
printf("%d\n",a);

}


/*write a program say sorry
*/
#include<stdio.h>
void main()
{
int a=0;
for(a=0;a<10;a++)
printf(" SO Sorry\n ");
}


//write a program for salary of an employees
//with the HRA is given and DA is given
#include<stdio.h>
void main()
{
int basic_salary;
float HRA,DA,gross_salary;
printf("Enter yours Basic salary:\n");
scanf("%d",&basic_salary);
if(basic_salary<=10000)
{
HRA=basic_salary*0.20;
DA=basic_salary*0.80;
gross_salary=basic_salary+HRA+DA;


}
else if(basic_salary<=20000)
{

HRA=basic_salary*0.25;
DA=basic_salary*0.90;
gross_salary=basic_salary+HRA+DA;

}
else if(basic_salary>20000)
{
HRA=basic_salary*0.30;
DA=basic_salary*0.95;
gross_salary=basic_salary+HRA+DA;



}

printf("yours HRA is %2f\n",HRA);
printf("your DA is %2f\n",DA);
printf("yours gross salary is %2f\n",gross_salary);


}



//write a basic salary of a ramesh
// author:upendra date:10/27/2020
#include<stdio.h>
void main()
{
int basic_salary; // baisc salary of a ramesh
float DA,HRA,gross_salary; //DA- dearness allowance HRA- house renta allowance
printf("Enter the Basic salary :\n");
scanf("%d",&basic_salary);
DA=0.4*basic_salary;
HRA=0.2*basic_salary;
gross_salary=basic_salary+DA+HRA;
printf("Gross salary of a ramesh is %f",gross_salary);




}


// write a program to input basic salary of an employees
// to calculate gross salary of an emloyees
#include<stdio.h>
void main()
{
int basic_salary;
float gross_salary;
printf("Enter the Basic salary of an Employees:\n");
scanf("%d",&basic_salary);
if(basic_salary<=10000)
{
gross_salary=((basic_salary*0.20)+(basic_salary*0.80));
printf("yours actual salary is %f",gross_salary);
}
else if(basic_salary<=20000)
{
gross_salary=((basic_salary*0.25)+(basic_salary*0.90));
printf("yours actual salary is %f",gross_salary);
}
else if(basic_salary>20000)
{
gross_salary=((basic_salary*0.30)+(basic_salary*0.95));
printf("yours actual salary is %f",gross_salary);
}


}



/*Runner*/

#include<libbgi.a>
#include<stdio.h>
#include<math.h>
void main()
{
int driver=DETECT,mode,j=100,i=0,x1,x22,x2,x11,y1,y11,y2,y22,a,y,k,speed;
float ang1=3.839724354,ang2=5.585053606, c1=0.05,
c2=-0.05,var1=2.967059728,var2=5.410520681,d1=0.072,d2=-0.072,s=2.35619449
;
initgraph(&driver,&mode,"C:\tc\bgi");
printf("

 Enter the number of rounds
"); scanf("%d",&k);printf("
Enter 1 for fast speed or 2 for normal speed
");scanf("%d",&speed);
if(speed==1) speed=11else speed=16;cleardevice();delay(1000);
while(k>=1)
{
 while(i<=700)
 {setcolor(8);
 circle(i,j,22);line(i,j+22,i-13,j+115);
 x1=i+50*cos(ang1);x2=i+50*cos(ang2);
 y1=j+22-50*sin(ang1);y2=j+22-50*sin(ang2);
 x11=x1+45*cos(ang1+1.54532952); x22=x2+45*cos(ang2+1.54532952);
 y11=y1-45*sin(ang1+1.54532952);
y22=y2-45*sin(ang2+1.54532952);setcolor(RED);

line(i,j+22,x1,y1);line(x1,y1,x11,y11);setcolor(GREEN);line(i,j+22,x2,y2);
line(x2,y2,x22,y22);
 x1=i-15+60*cos(ang1);  x2=i-15+60*cos(ang2);
 y1=j+115-60*sin(ang1); y2=j+115-60*sin(ang2);
 x11=x1+60*cos(var1); x22=x2+60*cos(var2);
 y11=y1-60*sin(var1); y22=y2-60*sin(var2);

line(i-13,j+115,x1,y1);line(x1,y1,x11,y11);setcolor(RED);line(i-13,j+115,x
2,y2);line(x2,y2,x22,y22);
 ang1=ang1+c1; ang2=ang2+c2;
 var1=var1+d1; var2=var2+d2;if(i==0) a=x22;
 if(ang1<=3.839724354){c1=0.05;var1=2.967059728;d1=0.072;}

if(ang1>=5.585053606){c1=-0.05;var1=5.410520681;d1=-0.072;a=x11+10;s=2.356
19449;}
 if(ang2<=3.839724354){c2=0.05;var2=2.967059728;d2=0.072;}
 if(ang2>=5.585053606){
c2=-0.05;var2=5.410520681;d2=-0.072;a=x22+10;s=2.35619449;}
 i=a+150*cos(s)+50;j=320-150*sin(s)-20;s=s-0.045;
 delay(speed);if(k!=1)cleardevice();
 }
 i=0;k--;
 }
getch(); }



#include<stdio.h>
void main()
{
int row,col;
for(row=1;row<=4;row++)
{
for(col=1;col<=4;col++)
{printf("%d\t%d\n",row,col);
}
}
}


//write a program to gets marks from the user
#include<stdio.h>
void main()
{


int grade;
printf("enter the grade:\n");
scanf("%d",&grade);
printf("%s\n",grade>=35?"Pass":"Fail");
}


/* passing the values to fuctions */
#include<stdio.h>
int multi(int,int);
void main()
{
int x,y,mul;
printf("Enter the two values to mul:");
scanf("%d%d",&x,&y);
mul=multi(x,y);
printf("Answer is %d",mul);



}

int multi(int a,int b)
{
int ans,a;
ans=a*b;
return(ans);

}

C Programs related if else or loop related mostly

 

/*write a program to check whether
it is alphabet ,digit , special character*/
#include<stdio.h>
void main()
{
int a// a is a integer types
char ch// ch is a character types
printf("Enter any character of keyboard:");
scanf("%d%c",&a,&ch);
if(a>=0)
printf("answer is a digit");

else
{
    if(ch>='a'&&ch<='z')
printf("answer is a lower alphabet");
else
{
    if(ch=='/'||ch=='*'||ch=='-'||ch=='+'||ch=='%'||ch=='$'||ch=='&'||ch=='*'||ch=='@'||ch=='!'||ch=='#'||ch=='^'||ch=='=')
    printf("answer is a special character");

    else
    printf("answer is a upper alphabet");
}

}

}




#include <stdio.h>

int main()
{
    int i, end;

    /*
     * Input a number from user
     */
    printf("Print all natural numbers from 1 to : ");
    scanf("%d", &end);

    /*
     * Print natural numbers from 1 to end
     */
    i=1;
    while(i<=end)
    {
        printf("%d\n", i);
        i++;
    }

    return 0;
}


/*write a program to check birthday
boy name by putting input  of birth year*/
#include<stdio.h>
void main()
{
int year;
printf("Enter the year of a birth:\n");
scanf("%d",&year);
if(year==1971)
    printf("Happy Birthday Dad");
else{
    if(year==1975)
        printf("Happy Birthday Mom");
    else{
        if(year==1992)
            printf("Happy Birthday Bhupendra");
            else{
                if(year==1995)
                    printf("happy Birthday maya");
                else{
                    if(year==2000)
                    printf("Happy birthday Upendra");
                    else{
                        if(year==2005)
                            printf("Happy Birthday nitesh");
                        else
                            {
                                if(year==2009)
                                    printf("happy Birthday chhottu");
                                else
                                    printf("User Input is undefined");
                            }

                    }

                }
            }

    }
}
}


//write a program to interchange contents
//author: upwndra ydav date:10/28/2020
#include<stdio.h>
void main()
{
int C,D//C&D are two numbers
printf("Enter the number C&D:\n");
scanf("%d%d",&C,&D);
printf("Interchanged Contents is %d\t%d",D,C);








}



. . . . .
struct student
{
 char name[20];
 int roll_no;
}*p;

p = (struct student*) calloc(5sizeof(struct student) );
. . . . .


/* write a program to check whether the alphabet is vowel or consonant */

#include<stdio.h>
void main()
{char ch;
printf("Enter a alphabet character :");
scanf("%c",&ch);
if(ch>='a'&&ch<='z')
{
    printf("alphabet is a lower case");
}
else if(ch>='A'&&ch<='Z')
{
    printf("alphabet is a upper case");
}
else
{
    printf("it is not a alphabet");
}
}



//write a program to find the log values of any number
//author:upendra
#include<stdio.h>
#include<math.h>
void main()
{
int x;
float sin_val;
printf("Enter the  number to find their sin  value:\n");
scanf("%d",&x);
sin_val=sin(x);
printf("sin value is %f",sin_val);







}


// logical operator exp
//author:upendra
#include<stdio.h>
void main()
{
int a,b,c,d,e,f,result;
printf("Note: 1=True and 0=False\n");
printf("enter the number to check logical:\n");
scanf("%d%d%d%d",&a,&b,&c,&d);
e=a>b;
f=c<d;
result=!(e&&f);
printf("Result is %d",result);








}


//write a program to find avg marks of student and percentage of student
//authors:upendra yadav date:10/27/2020
#include<stdio.h>
void main()
{
int sub1=100,sub2=100,sub3=100,sub4=100,sub5=100// sub-subjects marks
int avg_mark,perc_mark;
printf("Enter the marks of a student:\n");
scanf("%d%d%d%d%d",&sub1,&sub2,&sub3,&sub4,&sub5);
avg_mark=(sub1+sub2+sub3+sub4+sub5)/5;
perc_mark=avg_mark;
printf("avg_mark is %d\n",avg_mark);
printf("perc_mark is %d%%\n",perc_mark);






}


/* write a program to find
percentage and division of mark enter by
user*/
#include<stdio.h>
void main()
{
int n1,n2,n3,n4,n5,perc;
printf("Enter the marks of the subject:\n");
scanf("%d%d%d%d%d",&n1,&n2,&n3,&n4,&n5);
perc=(n1+n2+n3+n4+n5)/5;
if(perc>=60)
printf("division is frist grade");
else
{if(perc>=50&&perc<=60)
printf("division is a second grade");
else{
if(perc>=40&&perc<=50)
printf("division is third grade");
else
{if(perc>=35&&perc<=40)
printf("just pass");
else
printf("fail");}}
}
}


//write a program to find max blw 10 numbers
//author:upendra yadav
#include<stdio.h>
void main()
{
int n1,n2,max;
printf("enter the numbers to find maximum :\n");
scanf("%d%d",&n1,&n2);
max=(n1>n2)?n1:n2;
printf("max is %d",max);


}


//write a program to find the maximum btw two numbers
//author:upendra yadav date :10/29/2020
#include<stdio.h>
void main()
{
int num1,num2;
printf("Enter the two numbers in input :\n");
scanf("%d%d",&num1,&num2);
if(num1>num2)
printf("Answer is %d",num1);
else
{
if(num2>num1)
printf("Answer is %d",num2);
else
{
printf("Answer is %d",num1);     }

}






}



//write a program using ternary operatoe
#include<stdio.h>
void main()
{
int num1,num2,max;
printf("Enter the input of two number:\n");
scanf("%d%d",&num1,&num2);
max=(num1>num2)?num1:num2;
printf("greater number is %d and %d is %d",num1,num2,max);



}



/* write a program to find no of a days in a
month*/
#include<stdio.h>
void main()
{
int m; // m is a month no (number)
printf("Enter the month no:");
scanf("%d",&m);
if(m==1)
printf("31 days");
else
{
if(m==2)
printf("28 days or 29 days is leap year");
else{
if(m==3)
printf("31 days");
else{
    if(m==4)
        printf("30 days");
    else{
        if(m==5)
            printf("31 days");
            else{
                if(m==6)
                    printf("30 days");
                else{
                    if(m==7)
                        printf("31 days");
                    else{
                        if(m==8)
                            printf("31 days");
                        else{
                            if(m==9)
                                printf("30 days");
                            else{if(m==10)
                                printf("31 days");
                                else{
                                    if(m==11)
                                        printf)("30 days");

                                }
                            }
                        }
                    }
                }
            }
    }

}
}
}


/*write a program to find month no corresponds
to which months name*/
#include<stdio.h>
void main()
{
int m; // month no of month
printf("Enter the month number:");
scanf("%d",&m);
if(m==1)
printf("january");
else
{
if(m==2)
printf("febuary");
else
{
if(m==3)
printf("march");
else
{
    if(m==4)
        printf("april");
    else{
        if(m==5)
        printf("may");
        else
        {
            if(m==6)
                printf("june");
            else
            {
                if(m==7)
                    printf("july");
                else{
                     if(m==8)
                      printf("august");
                      else
                        {
                            if(m==9)
                                printf("september");
                            else
                            {
                                if(m==10)
                                    printf("october");
                                else{
                                    if(m==11)
                                        printf("november");
                                    else{
                                        if(m==12)
                                            printf("december");
                                    }
                                }
                            }
                        }
                       }
            }
        }
    }
}
}
}
}



// Play an AVI using the MSvfw32.lib
// in the case of Dev-C++ link with libmsvfw32.a via
// Project>>Project Options>>Parameters>>Add Lib>>libmsvfw32.a
// created via BCX generated C code then modified for Dev-C++
// (actually-Dev C++ is the IDE for the GNU GCC/G++ compiler)
// a Dev-C++ tested Windows Application by vegaseat 21nov2004

#include<stdio.h>
#include<windows.h>
#include<vfw.h>

#define ID_MCIFrame 0
#define ID_MENU1 9001
#define ID_MENU2 9002
#define ID_MENU3 9003

static HINSTANCE BCX_hInstance;
static int BCX_ScaleX;
static int BCX_ScaleY;
static char BCX_ClassName[2048];
static HANDLE ghInst;
static HWND Form1;
static HWND MCIFrame;
static HMENU MainMenu;
static HMENU FileMenu;
static OPENFILENAME OpenFileName;
static char szFile[2048];
static char szFileTitle[2048];

#define Show(WindowRedrawWindow(Window,0,0,0);ShowWindow(Window,SW_SH OW);

HWND BCX_Form(char,int=0,int=0,int=250,int=150,int=0,int=0);
void BCX_Set_Form_Color (HWND,COLORREF);
void Center (HWND,HWND=0,HWND=0);
char BCX_TmpStr(size_t);
char str (double);
char curdir (void);

void FormLoad (void);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
int InitOpenFileName (void);
int PopFileOpenDlg (HWND, char , char );
BOOL AddMenu (HWND);


// standard Windows Graphical User Interface main
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR CmdLine,int CmdShow)
{
WNDCLASS Wc;
MSG Msg;
// *****************************
strcpy(BCX_ClassName,"MCI_demo1");
// ************************************
// Scale Dialog Units To Screen Units
// ************************************
RECT rc = {0,0,4,8};
MapDialogRect (NULL,&rc);
BCX_ScaleX = rc.right/2;
BCX_ScaleY = rc.bottom/4;
BCX_hInstance = hInst;
// ******************************************************
Wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
Wc.lpfnWndProc = WndProc;
Wc.cbClsExtra = 0;
Wc.cbWndExtra = 0;
Wc.hInstance = hInst;
Wc.hIcon = LoadIcon(NULL,IDI_WINLOGO);
Wc.hCursor = LoadCursor(NULL,IDC_ARROW);
Wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
Wc.lpszMenuName = NULL;
Wc.lpszClassName = BCX_ClassName;
RegisterClass(&Wc);

FormLoad();
// event message loop
while(GetMessage(&Msg,NULL,0,0))
{
HWND hActiveWindow = GetActiveWindow();
if (!IsWindow(hActiveWindow) || !IsDialogMessage(hActiveWindow,&Msg))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
}
return Msg.wParam;
}


// circular storage, hold the memory leaks to a minimum
char *BCX_TmpStr (size_t Bites)
{
static int StrCnt;
static char *StrFunc[2048];
StrCnt=(StrCnt + 1) & 2047;
if(StrFunc[StrCnt]) free (StrFunc[StrCnt]);
return StrFunc[StrCnt]=(char*)calloc(Bites+128,sizeof(cha r));
}


char *str (double d)
{
register char *strtmp = BCX_TmpStr(16);
sprintf(strtmp,"% .15G",d);
return strtmp;
}


char *curdir (void)
{
register char *strtmp = BCX_TmpStr(2048);
GetCurrentDirectory (1024,strtmp);
return strtmp;
}


// center the window form on the screen, optional, for looks
void Center (HWND hwnd, HWND Xhwnd, HWND Yhwnd)
{
RECT rect, rectP;
int x, y, width, height;
int screenwidth, screenheight;
if(Xhwnd==0)
{
RECT DesktopArea;
RECT rc;
SystemParametersInfo(SPI_GETWORKAREA,0,&Deskto pArea,0);
GetWindowRect(hwnd,&rc);
SetWindowPos(hwnd,HWND_TOP,
((DesktopArea.right-DesktopArea.left)-(rc.right-rc.left))/2+
DesktopArea.left,((DesktopArea.bottom-DesktopArea.top)-
(rc.bottom-rc.top))/2 + DesktopArea.top,0,0,SWP_NOSIZE);
return;
}
GetWindowRect (hwnd,&rect);
GetWindowRect (Xhwnd,&rectP);
width = rect.right-rect.left;
x = ((rectP.right-rectP.left)-width)/2 + rectP.left;
if (Yhwnd==NULL)
{
height = rect.bottom-rect.top;
y = ((rectP.bottom-rectP.top)-height)/2 + rectP.top;
}
else
{
GetWindowRect(Yhwnd,&rectP);
height = rect.bottom-rect.top;
y = ((rectP.bottom-rectP.top)-height)/2+rectP.top;
}
screenwidth = GetSystemMetrics(SM_CXSCREEN);
screenheight = GetSystemMetrics(SM_CYSCREEN);
if ((x<0))
x=0;
if ((y<0))
y=0;
if ((x+width>screenwidth))
x = screenwidth-width;
if ((y+height>screenheight))
y = screenheight-height;
MoveWindow (hwnd, x, y, width, height, FALSE);
}


// create the windows form
HWND BCX_Form(char *Caption, int X, int Y, int W, int H, int Style, int Exstyle)
{
HWND A;
// assigne default style if none given
if (!Style)
{
Style= WS_MINIMIZEBOX |
WS_SIZEBOX |
WS_CAPTION |
WS_MAXIMIZEBOX |
WS_POPUP |
WS_SYSMENU;
}
A = CreateWindowEx(Exstyle,BCX_ClassName,Caption,
Style,
X*BCX_ScaleX,
Y*BCX_ScaleY,
(4+W)*BCX_ScaleX,
(12+H)*BCX_ScaleY,
NULL,(HMENU)NULL,BCX_hInstance,NULL);
SendMessage(A,(UINT)WM_SETFONT,(WPARAM)GetStockObj ect(DEFAULT_GUI_FONT),
(LPARAM)MAKELPARAM(FALSE,0));
return A;
}


// color, why not
void BCX_Set_Form_Color (HWND hWnd, COLORREF Kolor)
{
HBRUSH hbr=CreateSolidBrush(Kolor);
DeleteObject((HBRUSH)SetClassLong(hWnd,GCL_HBRBACK GROUND,(DWORD)hbr));
InvalidateRect (hWnd,NULL,TRUE);
}


// the details - corner coordinates,width,height,title
void FormLoad (void)
{
Form1=BCX_Form("MCI Demo",0,0,197,170);
SetClassLong(Form1,GCL_STYLE,GetClassLong(Form1,GC L_STYLE)|CS_DBLCLKS);
BCX_Set_Form_Color(Form1,RGB(0,0,0));
// Now create the MCIWnd
MCIFrame=MCIWndCreate(Form1,(HINSTANCE)ghInst,WS_C HILD|WS_VISIBLE|MCIWNDF_NOOPEN|MCIWNDF_NOTIFYALL," ;");
AddMenu(Form1);
Center(Form1);
Show(Form1);
}


// event message handler
LRESULT CALLBACK WndProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
static char s[2048];
memset(&s,0,sizeof(s));
static char mstr[2048];
memset(&mstr,0,sizeof(mstr));
static char mstr1[2048];
memset(&mstr1,0,sizeof(mstr1));
while(1)
{
if (Msg==WM_CREATE)
{
return 0;
break;
}
if (Msg==WM_COMMAND)
{
if (LOWORD(wParam)==ID_MENU2)
{
MCIWndClose(MCIFrame);
InitOpenFileName();
PopFileOpenDlg(Form1,szFile,szFileTitle);
if(strlen(szFile)>0)
{
MCIWndOpen(MCIFrame,szFile,0);
}
return 0;
}
if(LOWORD(wParam)==ID_MENU3)
{
MCIWndClose(MCIFrame);
ExitProcess(0);
}
break;
}
if (Msg==MCIWNDM_NOTIFYMODE)
{
while(1)
{
if ((long)lParam==MCI_MODE_NOT_READY)
{
SetWindowText(Form1,"Not Ready");
break;
}
if ((long)lParam==MCI_MODE_PAUSE)
{
SetWindowText(Form1,"Paused");
break;
}
if ((long)lParam==MCI_MODE_PLAY)
{
SetWindowText(Form1,"Playing");
break;
}
if ((long)lParam==MCI_MODE_STOP)
{
SetWindowText(Form1,"Stopped");
break;
}
if ((long)lParam==MCI_MODE_OPEN)
{
SetWindowText(Form1,"Opening");
break;
}
if ((long)lParam==MCI_MODE_RECORD)
{
SetWindowText(Form1,"Recording");
break;
}
if ((long)lParam==MCI_MODE_SEEK)
{
SetWindowText(Form1,"Seeking");
}
break;
}
break;
}
if (Msg==MCIWNDM_NOTIFYMEDIA)
{
SetWindowText(Form1,(LPSTR)lParam);
break;
}
if (Msg==MCIWNDM_NOTIFYPOS)
{
SetWindowText(Form1,str(MCIWndGetPosition(MCIFrame )));
break;
}
if (Msg==MCIWNDM_NOTIFYERROR)
{
SetWindowText(Form1,"MCI ERROR");
break;
}
if (Msg==WM_PAINT)
{
// The VideoWindow is restricted to a ratio of 4:3 here
break;
}
if (Msg==WM_SIZE)
{
static WORD Basedsp;
memset(&Basedsp,0,sizeof(Basedsp));
static WORD Cntr;
memset(&Cntr,0,sizeof(Cntr));
Basedsp=(HIWORD(lParam)-20)/3;
Cntr=(LOWORD(lParam)-(Basedsp*4))/2;
MoveWindow(MCIFrame,Cntr,0,(Basedsp*4),HIWORD(lPar am),TRUE);
// Don't forget to close opened Files
break;
}
if (Msg==WM_CLOSE)
{
MCIWndClose(MCIFrame);
DestroyWindow(Form1);
return 0;
break;
}
if (Msg==WM_DESTROY)
{
MCIWndClose(MCIFrame);
PostQuitMessage(0);
return 0;
}
break;
}
// tidy up and exit program
if (Msg==WM_DESTROY)
{
UnregisterClass(BCX_ClassName,BCX_hInstance);
PostQuitMessage(0);
}
return DefWindowProc(hWnd,Msg,wParam,lParam);
}


// tons of options for the neat file dialog box
int InitOpenFileName (void)
{
*szFile=0;
*szFileTitle=0;
OpenFileName.lStructSize=sizeof(OPENFILENAME);
OpenFileName.hwndOwner=MCIFrame;
OpenFileName.hInstance=(HINSTANCE)ghInst;
OpenFileName.lpstrFilter =
"Avi Files (*.AVI)\0*.avi\0All Files(*.*)\0*.*\0\0";
OpenFileName.lpstrCustomFilter=NULL;
OpenFileName.nMaxCustFilter=0;
OpenFileName.nFilterIndex=0;
OpenFileName.lpstrFile=szFile;
OpenFileName.nMaxFile=MAX_PATH;
OpenFileName.lpstrFileTitle=szFileTitle;
OpenFileName.nMaxFileTitle=MAX_PATH;
OpenFileName.lpstrInitialDir=curdir();
OpenFileName.lpstrTitle=NULL;
OpenFileName.nFileOffset=0;
OpenFileName.nFileExtension=0;
OpenFileName.lpstrDefExt="*.avi";
OpenFileName.lCustData=0L;
OpenFileName.Flags=OFN_SHOWHELP|OFN_PATHMUSTEXIST| OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
OpenFileName.lpfnHook=NULL;
OpenFileName.lpTemplateName=NULL;
return 0;
}


int PopFileOpenDlg (HWND Form1, char *szFile, char *szFileTitle)
{
OpenFileName.lpstrTitle="Open File";
OpenFileName.hwndOwner=MCIFrame;
OpenFileName.lpstrFile=szFile;
OpenFileName.lpstrFileTitle=szFileTitle;
OpenFileName.Flags=OFN_EXPLORER|OFN_CREATEPROMPT;
return GetOpenFileNamePreview(&OpenFileName);
}


BOOL AddMenu (HWND hwndOwner)
{
MainMenu=CreateMenu();
FileMenu=CreateMenu();
InsertMenu(MainMenu,0,MF_POPUP,(UINT)FileMenu,&quo t;&File");
AppendMenu(FileMenu,MF_STRING,ID_MENU2,"& Open");
AppendMenu(FileMenu,MF_STRING,ID_MENU3,"& Exit");
// activate the menu
if (!SetMenu(hwndOwner,MainMenu))
{
return FALSE;
}
return TRUE;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
FILE * pFile;

#define ARRAYSIZE 100
#define SONGNAME 25
#define SONGARTIST 25
#define SONGLENGTH 25
#define TRACK_NUMBER

void func1(void);
void func2(void);
void func3(void);
void func4(void);
void delete_song(void);
void func6(void);

typedef struct Mp3rec
{
        char name[SONGNAME];
        char artist[SONGARTIST];
        char length[SONGLENGTH];
        char tname[TRACK_NUMBER];
};


int main (void)
{



    int menuchoice=0;
    //fp= fopen("mp3_list.txt", "r" "W" "a"); either to add or read a text file.
    do
    {
      printf ("********************************************\n");
      printf ("************************************\n");
      printf ("*********** MP3 Player **********\n");
      printf ("********************************************");
      printf("\n1: Play File");
      printf("\n2: Show Library");
      printf("\n3: Add Record");
      printf("\n4: Edit/Modify ");
      printf("\n5: Delete Record");
      printf("\n6: Quit");

      printf("\n\nEnter Choice From 1-6: ");
      scanf("&#37;d", &menuchoice);

      switch (menuchoice)
      {
             case 1:
                    func1();
                    break;
             case 2:
                    func2();
                    break;
             case 3:
                    func3();
                    break;
             case 4:
                    func4();
                    break;

             case 5:delete_song();
                    break;

             case 6:
                    break;

             default:
                     printf("\nInvalid Choice: 1-4 Only Please");
                     }

                     }while(menuchoice!=4);
                     system("pause");
}

void func1(void)
{
     printf("\n\n Play File\n\n");
     printf ("********************************************\n");
     printf ("************************************\n");
     printf ("*********** **********\n");
     printf ("********************************************");
     {
    char commandarray[ARRAYSIZE];

    char mp3filename[ARRAYSIZE] ="C:\\mplayer\\Robin S - Show me Love.mp3";

    sprintf(commandarray"C:\\mplayer\\mplayer.exe \"%s\""mp3filename);

    printf("\nAttempting to Run Command \"%s\"...\n\n"commandarray);

    system(commandarray);

    int menuchoice=0;
    switch (menuchoice)
    printf("\n1: Back To Menu");
    printf("\n5: Quit");

    printf("\nDone.\n\n");




    system("pause");

}
}

void func2(void)
{
     printf("\n\n Show Library\n\n");
}

void func3(void)
{

     printf("\n\n Add Record/Song\n\n");
     fopen("ListofSongs.txt","r+");

     printf("\n\n Add Record\n\n");


}

void func4(void)
{
     printf("\n\n Edit/Modify the Current Song\n\n");
}

void delete_song(void)
{
     printf("\n\n Delete File\n\n");

 int i;
 int track_number;


     printf("Please Enter the track number that you wish to delete:");
     fflush(stdin);
     scanf("%d", &track_number);

}

     //for( Track_Number = Track_Number ; Track_Number <=Total Songs ; Track_Number ++)


void func6(void)
{
    // break;
}


#include<stdio.h>
void main()
{
int n; // n is a general numberi.e integer number.
printf("Enter any integers numbers:");
scanf("%d",&n);
if(n>0)
{printf("answer is a positive number");
}
else
{
if(n==0)
{printf("answer is a zero");}
else
{printf("answer is negative");}
}
}


/*write a program to count the amount entered
in note format*/
#include<stdio.h>
void main()
{
int amount;// amount entered by user
int note500,note100,note50,note20,note10,note5,note2;// notes
/* intiliasing note will be zero */
note500=note100=note50=note50=note20=note10=note5=note2=0;
printf("Enter the amount");
scanf("%d",&amount);
if(amount>=500)
{note500=amount/500;
amount=amount-(note500*500);
}
if(amount>=100)
{note100=amount/100;
amount=amount-(note100*100);
}
if(amount>=50)
{
note50=amount/50;
amount=amount-(note50*50);
}
if(amount>=20)
{
note20=amount/20;
amount=amount-(note20*20);
}
if(amount>=10)
{
note10=amount/10;
amount=amount-(note10*10);
}
if(amount>=5)
{
note5=amount/5;
amount=amount-(note5*5);
}
if(amount>=2)
{
note2=amount;
}

/*notes print*/

printf("Totol no. of notes\n");
printf("note500:%d\n",note500);
printf("note100:%d\n",note100);
printf("note50:%d\n",note50);
printf("note20:%d\n",note20);
printf("note10:%d\n",note10);
printf("note5:%d\n",note5);
printf("note2:%d\n",note2);




}



//write a program to find square roots of a any number
#include<stdio.h>
#include<math.h>
void main()
{
int a,squaroot;
printf("Enter the number to find square roots:\n");
scanf("%d",&a);
squaroot=sqrt(a);
printf("Square root of number is %d",squaroot);




}


//write a program to print star swatik


#include<stdio.h>
int main()
{
int i,j,N; // i,j are rows and column
printf("Input column or rows:\n");
scanf("%d",&N);
for(i=1;i<=N;i++)

{
for(j=1;j<=N;j++)
{
if(i==1||i==N||j==1||j==N||j==N/2||i==N/2)
printf("*");
else
{
printf(" ");}


}
printf("\n");
}




}


#include<stdio.h>
int main()
{
int i,j,rows;
printf("Input the no. of rows:\n");
scanf("%d",&rows);
for(i=1;i<=rows;i++)
{
for(j=1;j<=rows;j++)
{printf("*");
}
printf("\n");

}
return 0;
}




Python if / else

 Python if / else a1 = int ( input (" Enter the number: \n ")) a2 = int ( input (" Enter the number: \n ")) a3 = int ( i...