Posts

Showing posts from May 20, 2018

how to convert integer to decimal

Image
Program #include<stdio.h> #include<conio.h> void main(void) {          int n,c,k;          printf("\n Enter a integer in decimal:");          scanf("%d",&n);          printf("\n %d in binary:",n);          for(c=31;c>=0;c--)          {                  k=n>>c;                  if(k&1)                  printf("1");                  else       ...

How to find that given year is a leap year

Image
Program #include<stdio.h> void main(void) {         int year; printf("\n Enter a Year that you want to find it is a leap year:");         scanf("%d",&year);         if(year%100)         printf("\n %d is a leap year",year);         else if(year%400)         printf("\n %d is a leap year",year);         else if(year%4)         printf("\n %d is a leap year",year);         else         printf("\n %d is a not leap year",year); } Output Enter a Year that you want to find it is a leap year:2015  2015 is a leap year

Open a file Using C

Image
program  #include<stdio.h> #include<conio.h> void main(void) {         FILE*fptr;         fptr=fopen("Amin.txt","w");         int a,b;         char d;         printf("\n Enter a Name:");         scanf("%c",&d);         fprintf("\n Name   %c",d);         fclose(fptr); } OUTPUT Enter a Name:khalid file is open with the name of Amin and khalid is written inside the file NOTE: FILE*fptr it is use point a file or call a file it stand for (pointer to file) fptr=fopen("Amin.txt","w"); it is use to open a file  fprintf it is use to write in the file

FUTURE TECHNOLOGIES 2018 - 2025

Image
T echnology made our life fully relaxed Every Person wants to take part in new technologies but can't afford to buy it BUT CAN SEE AND ENJOY  So that why I try to upload some videos about FUTURE TECHNOLOGIES will come in the world. BEST TECHNOLOGIES THAT ARE COMING IN FUTURE VIDEOS: FUTURE TECHNOLOGIES

HOW TO FIND NET AND GROSS PAY OF AN EMPLOYEE (for 10 Employee)

PROGRAM #include<stdio.h> #include<conio.h> void main(void) { int f; char  a[65]; float basic,hmallow,pf,insurance,net,gross; printf("\nUSE UNDERSCORE INSTEAD OF SPACE"); for(f=1;f<=10;f++) { printf("\nEnter a Employee Name:"); scanf("%s",&a); printf("\n Enter your basic selary:"); scanf("%f",&basic); printf("\n Enter your House And Medical allowance:"); scanf("%f",&hmallow); printf("\n Enter your provident fund:"); scanf("%f",&pf); printf("\n Enter your insurance amount:"); scanf("%f",&insurance); gross=basic+hmallow; net=gross-(pf+insurance); printf("\nSalary slip"); printf("\nBasic salary:%2f",basic); printf("\nHouse And Medical allowance:%2f",hmallow); printf("\nGross salary:%2fRupees",gross); printf("\nDeduction:...