Friday, 11 August 2017

Prime number in given range

Q : Write a program to display all the prime numbers between two positive integers m and n. The values of m and n are to be taken from the user.

Solution : 


#include<stdio.h>
void main()
{
     int n,m,p;
     printf("Enter range starting number>> ");
     scanf("%d",&m);

Thursday, 10 August 2017

Jquery ID Selector

Enter Comment:



<html>
<head>
<title>Jquery Selector Girfa Student Help</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
   $(document).ready(function(){
    $("button").click(function(){
        $("#container").text($("#data").val());
    });
});
</script>
</head>
<body>
Enter Comment:  <br /><textarea id="data" rows="7" cols="50"></textarea><br /><br /> <button>Add</button>
<p id="container">

</p>
</body>

Wednesday, 9 August 2017

Jquery class selector

You can select a HTML tag with its class name which is used by tag. When you know class name then you can add custom HTML from a function of java script using jquery class selector.

<html>
<head>
    <title>Girfa Student Help</title>
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
    <style>
        .para
        {
            text-align:center;

Tuesday, 8 August 2017

2d Array Compare

Q : Write a function that returns 1 if the two matrices passed to it as argument are equal and 0
otherwise.

Solution : 


#include<stdio.h>
#include<conio.h>
#define ROW 2
#define COL 2
int compare(int a1[ROW][COL],int a2[ROW][COL]);
void main()
{
     int ar1[ROW][COL],ar2[ROW][COL],r,c;
     clrscr();