Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, 6 June 2016

PROBLEM 40:
Take obtained marks of a student out of 100 as input and print the grade as per following rules.
(Use both a) Positive and b) Negative Logic):
Obtained Marks
Grade
Between and including 50 and 60
D
Between and including 61 and 70
C
Between and including 71 and 80
B
Between and including 81 and 90
A-
Between and including 91 and 100
A+

Code:
#include<stdio.h>
main()
{
    // Variable declaration//
    int marks;
   /*Input*/
    printf("enter your marks:");
    scanf("%d",&marks);
     /* actual Working */
    if(marks>=50 && marks<=60)
    {
        printf("your grade is D");
    }
    else if(marks>=61 && marks<=70)
    {
        printf("your grade is C");
    }
    else if(marks>=71 && marks<=80)
    {
        printf("your grade is B");
    }
    else if(marks>=81 && marks<=90)
    {
        printf("your grade is A");
    }
    else if(marks>=91 && marks<=100)
    {
        printf("your grade is A+");
    }
    else
    {
        printf("invalid");
    }
    return 0;

}

Program Output:






For more problems click here


PROBLEM 39:
Prompt the user for his/her year of birth and if the year is a leap year print “You were born in a leap year”, otherwise print the age of the user. (leap.c)

CODE:

#include<stdio.h>
main()
{
// Variable declaration//
int year;
int present_year=2016;
/*Input*/
printf("Enter year:");
scanf("%d",&year);
/* actual Working */
  if(year%4==0)
     {
       printf("You were born in a leap year");
     }
else if(year<=2016 && year%4!=0)
     {
       present_year=present_year-year;
       printf("Your age is:%d",present_year);
     }
    else if(year>2016 || year%4!=0)
    {
        printf("we cannot tell you the age because its above than current year\nbut its not a leap year.");
    }
    return 0;
}

PROGRAM OUTPUT:













For more problems click here
PROBLEM 38:

For a student of CS102, take his Quiz #1 marks (out of 5) as input and convert it into percentage marks.

Code:

#include<stdio.h>
main ()
{
float marks;
float score;
printf("enter your quiz marks out of 5:");
scanf("%f",&marks);
score=(marks*100)/5;
printf("your percentage is:%.1f",score);
return 0;

}
Program Output:









For more problems click here
PROBLEM 37:

Write a program that prompts the user for the radius of a sphere and prints its volume. [volume of Sphere=(4/3) * pi * radius3].

Code:

#include<stdio.h>
main ()
{
float radius;
float volume;
printf("Enter radius:");
scanf("%f",&radius);
volume=(4*3.14159*radius*radius*radius)/3;
printf("volume of Sphere is:%f",volume);

return 0;

}

Program Output:













For more problems click here

PROBLEM 36:

Write a program that takes input of temperature in Celsius and converts it into Fahrenheit and prints the result.

CODE:

#include<stdio.h>
main ()
{
float temp;
float ans;
printf("enter temperature in celsius:");
scanf("%f",&temp);
ans=temp*9/5+32;
printf("your temperature in fehrenheit is:%f",ans);
return 0;
}


PROGRAM OUTPUT:









For more problems click here
PROBLEM 35:
Input two characters and swap their values.
Code:

#include<stdio.h>
main ()
{
char a;
char b;
char c;
printf("Enter two any  charcter:");
scanf("%c %c",&a,&b);
printf("you enter first character is '%c' and second is '%c'\n",a,b);
c=b;
b=a;
printf("************after snaaping*********\n");
printf("after snap your first character is '%c' and second is '%c'",c,b);
return 0;
}

Program Output:






For more problems click here
PROBLEM 34:

Write a c program  to Take distance in Km and time in hours as input and display speed in m/s.

Code:
#include<stdio.h>
main ()
{
float kilometre=0;
float time=0;
float race=0.0;
printf("Enter speed in kilometre: ");
scanf("%d",&kilometre);
printf("Enter time in hours: ");
scanf("%d",&time);
kilometre=kilometre*1000;
time=time*3600;
race=kilometre/time;
printf("speed in m/s is:%f",race);
return 0;

}
Program output:











For more problems click here
                            C THEORY                                
Read easy wording slides and solve assignments
1.first lecture Introduction to C
2.Second lecture Data Types, Variables, Basic Input/output
3.Lecture 3 Conditional Statements (If-Else Building Blocks)
4.Leture 4 loop statement
5.C Programming Lec 5: Nested Loop Statement
6.Lec #6: Arrays and Strings 
7.Lec #7: String and Math Function









Doc password is:http://codesplanets.blogspot.com
Scratch Environment:








Statements Block or Scripts
Example 01

To move a sprite 10 step in forward direction



Example 02
To move a sprite 10 step in forward direction with when click condition






some program in c:

Problem01(color.sb)

Take a new costume and add and puzzle piece which change the color effect by some value










Problem02(square.sb)
Take a number from user and print it square value










Problem03(cube .sb)

Take a number from user and print it cube value


33.Write a C program to take input in binary and add 1 in the given value.
click here













previous                                         1 2                                          next page
PROBLEM 33:

Write a C program to take input in binary and add 1 in the given value.

CODE:
#include<stdio.h>
main()
{
    // Variable declaration//
char a[25];
int b[25];
int i,count=0,z=48,o=49,j=0,debug=0; //here i intailze z means zero to 48 bcz acii value is 48 and o means one 49 in asII
 /*Input*/
printf("Enter binary number:");
gets(a);
/* actual Working */
     for(i=0;a[i]!='\0';i++) //this loop will count total elements in array
{
    count=count+1;
}
count=count-1;
if(a[count]==z) //here i cheak array a and index count-1 is equal to zero so this condition will run
{
    a[count]=o; //here a[count] set one
    for(i=0;a[i]!='\0';i++)
    {
       printf("%c",a[i]);
    }
}
else if(a[count]==o && a[count-1]==z)   //if a[count] equal to one and a[count-1] equal to zero
{
    a[count]=z;
    if(a[count-1]==z)
    {
        a[count-1]=o;
        for(i=0;a[i]!='\0';i++)
    {
       printf("%c",a[i]);
    }
    }
}
 else if(a[count]==o && a[count-1]==o)
{
    a[count]=z;
    count=count-1;
     if(a[count]==o)
     {
         a[count]=z;
     }
      if(a[count-1]=z)
     {
         a[count-1]=o;
     }
     debug=1;
     }
     if(debug==0)
     {
    for(j=8;a[j]!='\0';j++)
    {
        if(a[j]>=48 && a[j]<=57)
        {
       printf("%c",a[j]);
        }
    }
     }
     else
     {
        for(j=0;a[j]!='\0';j++)
    {


       printf("%c",a[j]);
    }
     }
     return 0;
     }
PROGRAM OUTPUT:









For more problems click here
15.Write a C Program to print out all of the factors of a number from 1 to N.
For N = 9, output is 1, 3, 9

For N = 7, output is 1, 7
click here

16.Write a C Program to calculate the power of a number, given the number and the exponent.
Click here for program

17.Multiply all the digits of a number n by each other, repeating with the product until a single digit is obtained. The number of steps required is known as the multiplicative persistence, and the final digit obtained is called the multiplicative digital root of n. For example, the sequence obtained from the starting number 9876 is (9876, 3024, 0), so 9876 has a multiplicative persistence of two and a multiplicative digital root of 0. Write a C Program to for finding number persistency and multiplicative root of any positive integer n.
click here

18.Write a C Program that prompts the user for a positive integer as input, printing the respective hollow triangle


CLICK HERE

19.Write a C program that prints an equilateral triangle for a given n.
For n=3
*
**
***
**
*
For n=4
*
**
***
****
***
**

*
CLICK HERE

20.Ramanujan Number is the smallest number expressible as the sum of two cubes in two different ways. The two different ways are these:

1729 = 13 + 123 = 93 + 103

The second such number is 23 + 163 = 93 + 153 = 4104. Sequences of such numbers are called Taxicab numbers. Write a C program that print first n taxicab numbers (provided n > 0).

click here

21:Mr. Bhola is fed-up of giving individual dates as inputs. He wants a complete calendar starting from 1st January to 31st December for a given year.

Write a C program that takes input as a int in format yyyy.
CLICK HERE

22:Write a C program that solve the n-ball problem; given any number of balls, you have to tell how many times you have to weigh at minimum to find which ball is the heavier one. Also your code should display the 3 splits of n balls. Make sure that your code handles properly all values of n, not only those that are multiples of 3.
For n=8, min_weigh = 2 and pan1=3, pan2=3, remaining=2.

For n=13, min_weigh = 3 and pan1=5, pan2=5, remaining=3.
CLICK HERE

23.CS102 students loves to read the book of pscp but they are facing difficulties in searching the book
in library, as the book are placed by related fields in library not by course name so it is hard to
search the book manually, the solution of this problem is suggested to have such “search program”
that takes the isbn number of book find whether the book is available or not and tells Its edition,
price , Write a search program that search the availability of book its Edition ,ISBN and price .
Hints:

1. Consider the following table for example

CLICK HERE

24.Write a program that count the occurrence of each element in an int array
of size 25
Sample Input: 1 13 1 4 20 5 1 5 13 1 5 20 4 3 5
Sample Output:
occurrence of 1 : 4
occurrence of 13 : 2
occurrence of 4 : 2
occurrence of 20 : 2
occurrence of 5 : 4

occurrence of 3 : 1
CLICK HERE

25.Write a program that tests equality of two array of size , suppose there are
two int array, The program should say “yes” if every element of first array is equal to the
corresponding element of second array, other wise no if at least one element is not equal .
Sample Input: First_Array 1 13 1 4 20 5
Second_Array 0 13 1 4 20 5
Sample Output: NO
Sample Input: First_Array 1 13 1 4 20 5
Second_Array 1 13 1 4 20 5

Sample Output : Yes
CLICK HERE
26.Write a C program to keep records and perform statistical analysis for a
class of student. The class may have up to 5 student . There are five quizzes during the term. Each
student is identified by a four-digit student number. The program will print the student scores and
calculates and print the statistics(high score,low score and average score ) for each quiz . The output

is in the same order as input ; no sorting is required .
CLICK HERE

27.Create a fraction calculator that takes input of two fraction and perform
the operation select by the user
First create two char array that is used to take the input in fraction from user and then user input the
operation to be performed like (+,-,/,*). your program should print the menu like below
Sample Input: Enter The first fraction value : 2/5

Sample Output: Enter The second Fraction Value : 2/5

28.
Write a program that reads full names, one per line, and then prints them in
the standard telephone directory format. For example,
Sample Input1: George Frederic Handel
Sample Output1: Handel, George F.
Sample Input2: Joseph Haydn
Sample Ouput2: Haydn, Joseph
Sample Input3: Johann Christian Bach
Sample Output3: Bach, Johann C.
Your program should ask user name and print output repeatedly till user press any sentinel value

(you may select any sentinel here)
click here

29.Write a C program to delete the all vowels from a user-entered string. You
are required to delete the vowels from the string. Just not printing them is not a valid answer.
Sample Input1:Hello World (String Length=11)
Sample Output1: Hll Wrld (String Length=8)
Sample Input2: Apple (String Length=5)
Sample Output2:ppl (String Length=3)
click here

30.A string is said to be complete if it contains all the characters from a to z.
For a user-entered string, check if it is complete or not.
Sample Input: The quick brown fox jumps over a lazy dog
Sample Output: The entered string is complete.
CLICK HERE

31.Write a C program to find a sub-string in a string.
Sample Input: you just blew my mind
Substring to search: my

Sample Output: Substring found.
click here

32.Write a C program to convert numeric string to an int of same value?
For Example, if you read a string “1524” then an integer variable in your program should be

assigned 1524 as an integer.
CLICK HERE


previous                                   1 2 3                                          next page

Sunday, 5 June 2016

                           C Projects                                    

1.Modern Periodic Table in c.

many projects will be upload which will help you so keep connect with us.

Modern  Periodic Table project in c:
Scope of the project  : It is developed using the C programming language for the purpose of storing name, symbol, atomic number, atomic weight.

Description of the project  :
This project is to explore or to display the stored information. You can search an element by using any of the following method:
1.    By name of element
2.    By symbol of element
Program will tell the user about element atomic mass,atomic weight,formulaes,electron configration,meliting point and all which is famously relatives.
C functions uses:
Filing,if else condion,arrays,functions,2d array ,strings,pointers.

CODE:

#include<stdio.h>
#include<string.h>
void input(char arr[],int count1); //function prtotype
main()
{
//intailization
int i=0,temp=0,t=0,count1=0;
char arr[100];
char exit;
do{
printf("Enter element name or symbol:");
scanf(" %[^\n]s",&arr);
 for(i=0;arr[i];i++)  //this loop will convert uppercase alphabets to lowercase
    {
    if(arr[i]>=65 && arr[i]<=96)
    {
    temp=arr[i];
    temp=temp+32;
    arr[i]=temp;
    }
    }
    count1++;  //this count1 for print searching history once time on the top of file
    input(arr,count1); //function calling
    printf("Do you want to search another element?\nif yes press y if want to exit press n\n");
    scanf(" %c",&exit);
    i=0;
    temp=0;
}while(exit!='n');
return 0;
}
    void input(char arr1[],int count1) //function working
    {
    int j=0,count=0;
    FILE *fptr;
    char *elements[] = {
    "hydrogen","helium","lithium","berylium","boron","carbon","nitrogen","oxygen",
    "fluorine","neon","sodium","magnesium","aluminum","silicon","phosphorus","sulfur","chlorine","argon",
    "potassium","calcium","scandium","titanium","vanadium","chromium","manganese","iron","cobalt","nickel",
    "copper","zinc","gallium","germanium","arsenic","selenium","bromine","krypton",
    "rubidium","strontium","yttrium","zirconium","niobium","molybdenum","technetium","ruthenium","rhodium",
    "palladium","silver","cadmium","indium","tin","antimony","tellurium","iodine",
    "xenon","cesium","barium","lanthanum","cerium","praseodymium","neodymium","promethium","samarium","europium","gudolinium",
    "terbium","dysprosium","holmium","erbium","thulium","ytterbium","lutetium","hafnium","tantalum","tungsten",
    "rhenium","osmium","iridium","platinum","gold","mercury","thallium","lead","bismuth","polonium","astatine",
    "radon","francium","radium","actinium","thorium","protacitinium","uranium","neptunium","plutonium",
    "americium","curium","berkelium","californium","einsteinium","fermium","mendelevium","nobelium",
    "lawrencium","rutherfordium","dubnium","seaborgium","bohrium","hassium","meitnerium"
    }; //this pointer string for save the elements name
    char *symbol[]={
    "h","he","li","be","b","c","n","o","f","ne","na","mg","al","si","p","s","cl","ar","k",
    "ca","sc","ti","v","cr","mn","fe","co","ni","cu","zn","ga","ge","as","se","br","kr","rb","sr","y","zr",
    "nb","mo","tc","ru","rh","pd","ag","cd","in","sn","sb","te","i","xe","cs","ba","la","ce","pr","nd","pm",
    "sm","eu","gd","tb","dy","ho","er","tm","yb","lu","hf","ta","w","re","os","lr","pt","au","hg","tl","pb",
    "bi","po","at","rn","fr","ra","ac","th","pa","u","np","pu","am","cm","bk","cf","es","fm","md","no","lr",
    "rf","db","sg","bh","hs","mt"
    };//this pointer string for save the symbol of elements

    float atomic_weight[]={
    1.0079,4.0026,6.941,9.0122,10.811,12.0107,14.0067,15.9994,18.9984,20.1797,22.9815,
    24.305,26.9815,28.0855,30.9738,32.065,35.453,39.948,39.0983,40.078,44.9559,47.867,50.9415,51.9961,54.938,55.845,58.9332,
    58.6934,63.546,65.39,69.723,72.64,74.9216,78.96,79.904,83.8,85.4678,87.62,88.9059,91.224,92.9064,
    95.64,98,101.07,102.9055,106.42,107.8682,112.411,114.818,118.71,121.76,127.6,126.9045,131.293,
    132.9055,137.327,138.9055,140.116,140.9077,144.24,145,150.36,151.964,157.25,158.9253,162.5,164.9303,167.259,
    168.9342,173.04,174.967,178.49,180.9479,183.84,186.207,190.23,192.217,195.078,196.9665,200.59,204.3833,
    207.2,208.9804,209,210,222,223,226,227,232.0381,231.0359,238.0289,237,244,243,247,247,251,252,257,258,
    259,262,261,262,266,264,277,268
    }; //this array for save the values of atomic weight
    int atomic_number[]={
    1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,
    31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
    65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,
    99,100,101,102,103,104,105,106,107,108,109
    }; //this array for save the elements atomic numbers
    int discovery[]={
    1776,1895,1817,1797,1808,1809,1772,1774,1886,1898,1807,1755,1825,1824,1669,1668,1774,
    1894,1807,1808,1879,1791,1830,1797,1774,1775,1735,1751,1751,1752,1875,1886,1884,1817,1826,1898,1861,
    1790,1794,1789,1801,1781,1937,1844,1803,1803,1804,1817,1863,1861,1862,1783,1811,1898,1860,1808,1839,
    1803,1885,1885,1945,1879,1901,1880,1843,1886,1867,1842,1879,1878,1907,1923,1802,1783,1925,1803,1803,
    1735,1736,1765,1861,1862,1864,1898,1940,1900,1939,1898,1899,1829,1913,1789,1940,1940,1944,1944,1949,
    1950,1952,1952,1955,1958,1961,1964,1967,1974,1981,1984,1982
    };//this array for save the years of dicoveray of a element
    int group[]={
    1,18,1,2,13,14,15,16,17,18,1,2,13,14,15,16,17,18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
    16,17,18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,2,3,101,101,101,101,101,101,101,101,101,101,
    101,101,101,101,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,1,2,3,102,102,102,102,102,102,102,102,102,
    102,102,102,102,4,5,6,7,8,9
    };//this array save elements group
    int melting[]={
    -259,-272,180,1278,2300,3500,-210,-218,-220,-249,98,639,660,1410,44,113,-101,-189,64,839,1539,1660,
    1890,1857,1245,1535,1495,1453,1083,420,30,937,81,217,-7,-157,39,769,1523,1852,2468,2617,2200,2250,
    1966,1552,962,321,157,232,630,449,114,-112,29,725,920,795,935,1010,1100,1072,822,1311,1360,1412,1470,
    1522,1545,824,1656,2150,2996,3410,3180,3045,2410,1772,1064,-39,303,327,271,254,302,-71,27,700,1050,1750,
    1568,1132,640,640,994,1340,986,900,860,1527,0000,827,1627
    };//this array save melting popint values of a element
    int boiling[]={
        -253,-269,1347,2970,2550,4827,-196,-183,-188,-246,883,1090,2467,2355,280,445,-35,-186,774,1484,
        2832,3287,3380,2672,1962,2750,2870,2732,2567,907,2403,2830,613,685,59,-153,688,1384,3337,4377,
        4927,4612,4877,3900,3727,2927,2212,765,2000,2270,1750,990,184,-108,678,1140,3469,3257,3127,
        3127,3000,1900,1597,3233,3041,2562,2720,2510,1727,1466,3315,5400,5425,5660,5627,5027,4527,3827,
        2807,357,1457,1740,1560,962,337,-62,677,1737,3200,4790,7777,3818,3902,3235,2607

    };//this array will save the boiling point values
    char *electron[]={
        "1S^1","1S^2","1S^2 2S^1","1S^2 2S^2","1s^2 2s^2 2p^1","1s^2 2s^2 2p^2","1s^2 2s^2 2p^3","2s^2 2p^4","2s^2 2p^5",
        "2S^2 2P^6","3S^1","3s^2","3S^2 3P^1","3S^2 3P^2","3S^2 3P^3","3S^2 3P^4","3S^2 3P^5","3S^2 3P^6",
        "4S^1","4S^2","3d^1 4S^2","3d^2 4S^2","3d^3 4S^2","3d^5 4S^1","3d^5 4S^2","3d^6 4S^2","3d^7 4S^2","3d^8 4S^2",
        "3d^10 4S^1","3d^10 4S^2","3d^10 4s^2 4p^1","3d^10 4s^2 4p^2","3d^10 4s^2 4p^3","3d^10 4s^2 4p^4","3d^10 4s^2 4p^5",
        "3d^10 4s^2 4p^6","5s^1","5s^2","4d^1 5s^2","4d^2 5s^2","4d^4 5s^1","4d^5 5s^1","4d^5 5s^2","4d^7 5s^1","4d^8 5s^1",
        "4d^10","4d^10 5s^1","4d^10 5s^2","4d^10 5s^2 5p^1","4d^10 5s^2 5p^2","4d^10 5s^2 5p^3","4d^10 5s^2 5p^4",
        "4d^10 5s^2 5p^5","4d^10 5s^2 5p^6","6s^1","6s^2","5d^1 6s^2","4f^1 5d^1 6s^2","4f^3 6s^2","4f^4 6s^2","4f^5 6s^2","4f^6 6s^2","4f^7 6s^2","4f^7 5d^1 6s^2","4f^9 6s^2","4f^10 6s^2","4f^11 6s^2","4f^12 6s^2","4f^13 6s^2","4f^14 6s^2","4f^14 5d^1 6s^2","4f^14 5d^2 6s^2","4f^14 5d^3 6s^2","4f^14 5d^4 6s^2","4f^14 5d^5 6s^2","4f^14 5d^6 6s^2","4f^14 5d^7 6s^2","4f^14 5d^9 6s^1","4f^14 5d^10 6s^1","4f^14 5d^10 6s^2","4f^14 5d^10 6s^2 6p^1","4f^14 5d^10 6s^2 6p^2","4f^14 5d^10 6s^2 6p^3","4f^14 5d^10 6s^2 6p^4","4f^14 5d^10 6s^2 6p^5","4f^14 5d^10 6s^2 6p^6","7s^1","7s^2","6s^1 7s^2","6d2 7s2","5f^2 6d^1 7s^2","5f^3 6d^1 7s^2","5f^4 6d^1 7s^2","5f^6 7s^2","5f^7 7s^2"

    };//this array will save electron configration of every elements
    for(j=0;j<109;j++) // this loop will compare user input with the elements string and symbol string
    {
    if (strcmp(arr1,elements[j]) == 0 || strcmp(arr1,symbol[j]) == 0  )
    {
        count=j;// if its match then count save the value of j
        break;
    }
    }
if (strcmp(arr1,elements[count]) == 0 || strcmp(arr1,symbol[count]) == 0  )
{
printf("Element name:%s\n",elements[count]);
printf("Element symbol:%s\n",symbol[count]);
printf("Atomic weight:%f\n",atomic_weight[count]);
printf("Atomic number:%d\n",atomic_number[count]);
if(count==5||count==15||count==25||count==28||count==29||count==32||count==46||count==49||count==50||count==78||count==79||count==81||count==82)
{
printf("Element Discovery date:ancient\n");
}
else
{
printf("Element Discovery date:%d\n",discovery[count]);
}
printf("Element group:%d\n",group[count]);
if(count==100 ||count==103||count==104||count==105||count==106||count==107||count==108)
{
    printf("Melting point:no melting point\n");
}
else{
printf("Melting point:%d\n",melting[count]);
}
if(count==90||count==95||count==96||count==97||count==98||count==99||count==100||count==101||count==102||count==103||count==104||count==105||count==106||count==107||count==108)
{
    printf("Boiling point:no boiling point");
}
else{
printf("Boiling point:%d\n",boiling[count]);
}
printf("Electron configuration:%s\n",electron[count]);
}
else{
    printf("Not found");

}
fptr=fopen("periodic.txt","a+"); //filing its save the searching history in periodic.txt file name
if(fptr==NULL){
printf("Error!");
return 0;
}
if(count1==1)
{
    printf("your searching history  is save on your file\n");
    printf("please remove your last history on your file because its enter history to a same file\n");

    fprintf(fptr,"Searching History\n");
}
fprintf(fptr,"Element name:%s\n",elements[count]);
fprintf(fptr,"Element symbol:%s\n",symbol[count]);
fprintf(fptr,"Atomic weight:%f\n",atomic_weight[count]);
fprintf(fptr,"Atomic number:%d\n",atomic_number[count]);
if(count==5||count==15||count==25||count==28||count==29||count==32||count==46||count==49||count==50||count==78||count==79||count==81||count==82)
{
  fprintf(fptr,"Element Discovery date:ancient\n");
}
else
{
  fprintf(fptr,"Element Discovery date:%d\n",discovery[count]);
}
fprintf(fptr,"Element group:%d\n",group[count]);
if(count==100 ||count==103||count==104||count==105||count==106||count==107||count==108)
{
    fprintf(fptr,"Melting point:no melting point\n");
}
else
{
   fprintf(fptr,"Melting point:%d\n",melting[count]);
}
if(count==90||count==95||count==96||count==97||count==98||count==99||count==100||count==101||count==102||count==103||count==104||count==105||count==106||count==107||count==108)
{
   fprintf(fptr,"Boiling point:no boiling point");
}
else
{
  fprintf(fptr,"Boiling point:%d\n",boiling[count]);
}
fprintf(fptr,"Electron configuration:%s\n",electron[count]);
fclose(fptr);
}
PROJECT OUTPUT:



 Your searching history is also save in file where you save your c file.