Posts

Showing posts from February, 2016

Adition all Odd & Even number from User Input

Image
 Odd Number #include main() {     int i,n,a=0;    scanf("%d",&n);     for(i=1;i<=n;i=i+2)     a=a+i;     printf("%d\n",a); } Even Number #include main() {     int i,n,a=0;     scanf("%d",&n);     for(i=0;i<=n;i=i+2)     a=a+i;     printf("%d\n",a); } Facebook

C programming: Find Vowel-Consonant Or if Other

Image
#include int main() {     char ch;     scanf("%c",&ch);     if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')     {         printf("%c is lower case vowel",ch);     }     else if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U')     {     printf("%c is Upper case vowel",ch);     }     else if(ch>='a'&&ch<='z')     {         printf("%c is lower consonant",ch);     }     else if(ch>='A'&&ch<='Z')     {         printf("%c is upper consonant",ch);     }     else     {         printf("There is no english word");     }     getchar();   ...

Array student result programme in c

Image
Array student result programme in c : #include main() {     int ft[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};     int st[40]={80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41};     int fm[40]={41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61};     int i,marks,count;;     double tm[40];     for(i=0;i         tm[i]=ft[i]/4+st[i]/4+fm[i]/2;     }     for(i=1;i<=40;i++){         printf("Roll No:%d Total mark:%.0lf\n",i,tm[i-1]);     } } Output:

VALENTINE DAY PROGRAME

Image
VALENTINE DAY PROGRAME BY ME : #‎ include‬ #include void main() { char *arr = " Some Love One\n Some Love Two\n I Love One\n That is You\n Hopefully I Will Find You\n HAPPY VALENTINE DAY :-* "; int i = 0; printf(" Please Type Something:\n"); while(i < strlen(arr)) { getch(); printf("%c", arr[i++]); } getch(); } Run It And Keep Typing FACEBOOK