Thursday, April 28, 2022

Javascript form validation neb most important question solution class 12

 Q ) Write a program to validate name and age using javascript form validation .

Solutions :

<html>

    <head>

        <title>Javascript form validation</title>

    </head>

    <body>

        <script>

            function validate(){

                let x =document.myform.Name.value;

                let y =document.myform.Age.value;

                if(x==null || x==""){

                    alert("Name must be entered");

                    return false;

                }

                else if(y==null || y==""){

                    alert("Age must be enteres");

                    return false;

                }

            }

        </script>

        <form action="" name="myform" onsubmit="return validate()">

            Name:<input type="text" name="Name" placeholder="Enter your name">

            Age:<input type="number" name="Age" placeholder="Enter your age">

            <input type="submit" value="Submit">

        </form>

    </body>

</html>

Wednesday, April 27, 2022

Class 12 computer science paper solve of Oxford Secondary School by Tukus Technology

 Class 12 computer science 2079 paper solutions of Oxford Secondary School by Tukus Technology 

C program to find factorial of given number using recursive function | C program important question class 12

Write a program to find factorial of given number using recursive function in c program .

Solution :

#include<stdio.h>

#include<conio.h>

int fact(int);

void main(){

int n,f;

printf("Enter no. for finding factorial");

scanf("%d",&n);

f=fact(n);

printf("factorial is %d",f);

getch();

}

int fact(int n){

if(n==0){

return(1);

}

else{

return(n*fact(n-1));

}

}

C program structure important question with its solution | Most repeated questions and important question of c program class 12 structure solutions

Write a program to enter the 20 employee’s name, age, and salary  using structure and print them (C program question class 12) .

Solutions :

#include<stdio.h>

struct emp

{

 char n[100];

int age;

int sal;

};

struct emp e[20];

int main()

{

int i;

printf("Enter employee name age and salary\n");

for(i=0;i<20;i++)

{

scanf("%s %d %d",e[i].n,&e[i].age,&e[i].sal);

}

printf("Name \t Age \t Salary\n");

for(i=0;i<20;i++)

{

printf("%s\t %d\t %d\t\n",e[i].n,e[i].age,e[i].sal);

}

return 0;

}

OUTPUT :

c program to enter age name and salary of employee by using structure of c program



BCA ENTRANCE RESULT 2079 - CHECK YOUR BCA RESULT

 Hello everyone BCA Entrance result of TU ( 2079 ) is published . You can check your result by downloading pdf , so go on this video and dow...