Posts

Showing posts from July, 2017

Lighting

Lighting I saw her from a distance our of the corner of my eye her hair was shining bright she's the prettiest girl i've ever seen around I saw her from a distance she made me wanna smile her face is cute and it's beautiful and she's the only girl that stands out in the crowd I hope you notice me sometime I hope you'll be with me,be mine you're everything,you're my sunshine oh,oh,oh she's got me struck by lighting lighting and it's frightening frightening I don't ever think I'll be the same again you're my princess,my girl you're my interest,my world you mean everything everything, to me ohhh ohhh oh oh and if you smile at me you would make my heart start racing anything to see you're so amazing think i've been struck by lighting lighting and it's frightening frightening I don't ever think i'll be the same again cause i've been struck by lighting lighting and it's frightening f...

Tower of honoi in c program

Tower of honoi in c program: #include stdio.h void toh(int n,int source,int aux,int dest){ if(n==1){     printf("Move the disk from tower no: %d to tower no: %d\n",source,dest);     return;  }  toh(n-1,source, dest,aux);  toh(1,source,aux,dest);  toh(n-1,aux, source,dest); } int main() {     toh(5,1,2,3);     return 0; }

Charecter & space founder in c program

Charecter & space founder in c program: #include main() {     char str[80];     printf("Enter a string: ");     scanf("%[^\n]",str);     int i,countAlpha=0,countSpace=0;     for(i=0;str[i]!='\0';i++){         if((str[i]>='A' && str[i]<='Z')||(str[i]>='a' && str[i]<='z')){             countAlpha++;         }         else if(str[i]==' '){///else if(str[i]==32) =>==> (' '=32)             countSpace++;         }     }     printf("Total Alphabetic charecters found: %d\n",countAlpha);     printf("Total Spaces charecters found: %d\n",countSpace); }

Leap Year in c

Leap Year in c #include main() {     int year;     printf("Enter a year: ");     scanf("%d",&year);     if((year%4==0 && year%100!=0)||year%400==0){         printf("%d is a leap year",year);     }     else{         printf("%d is not a leap year",year);     }     return 0; }

Leap Year program in c language

Leap Year program in c language: #include main() {     int year;     printf("Enter year: ");     scanf("%d",&year);     if(year%4==0){         if(year%100==0){             if(year%400==0){                 printf("%d is a leap year",year);             }             else{                 printf("%d is not a leap year",year);             }         }         else{             printf("%d is a leap year",year);         }     }     else{         printf("%d is not a leap year",year);     } }