Step 4. Click on the Save Template button To make this youtube playlist work we need to add the HTML structure of it: Step 5. Go to Layout or Pages or anywhere you want to add it and add the following code inside the HTML area (if you want to add it as a widget, paste the code inside a HTML/Javascript gadget by clicking on Add a gadget link within the Layout/Page Elements section):

Search This Blog

Follow me on Facebook

2 funcuions to add and to convert decimal into binary

#include <stdio.h>
#include "waqas.h"
int main()
{
       inta,b,c,d,n,e;                             
       printf("Enter 1 for add and 2 for convert\n\n");
       scanf("%d" ,&e);

       if(e==1)
       {
              printf("Enter four separate numbers\n");
              scanf("%d%d%d%d" ,&a,&b,&c,&d);
              printf("%d is the Sum\t" ,add(a,b,c,d));
       }
       else if(e==2)
       {
              printf("Enter a decimal number to convert in binary\n");
              scanf("%d" ,&n);
              printf("The binary equilant is = %d\n" ,convert(n));
       }
       else
       {
              printf("Error !!!!!!\n");
       }
       return 0;

}
#include <stdio.h>
#include <math.h>

int add(int a ,int b,int c, int d)
{
       int sum;
       sum=a+b+c+d;
       return sum;
}

int convert(int n)
{
       intremainder,bin=0,j=0;
       while(n>0)
       {
              remainder=n%2;
              bin=bin+remainder*pow(10,(double)j);
              j++;
              n=n/2;
       }
       return bin;
}
make a function to add integers

make a function to convert decimal number to binary number