Skip to main content

Posts

Showing posts from November, 2018

WAP to read a number and check whether it is Armstrong or not

              Check whether it is Armstrong or not ? Structure num=153        sum=1^3+5^3+3^3=1+125+27=153        Number is Armstrong */ #include<stdio.h> #include<conio.h> main( ) { int num,sum,org; clrscr(); printf("\nEnter the number :"); scanf("%d",&num); sum=0; org=num; do {        sum=sum+(num%10)*(num%10)*(num%10); num=num/10; } while(num!=0); if(sum==org) printf("\nNUmber is Armstrong"); else printf("\nNumber is not Armstrong"); getch(); } c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler...

Check whether it is Palindrome or not ?

WAP to read a number and check whether it is P alindrome   or not ? Example num=121  (madam)        rev=121        Number is Palindrome */ #include<stdio.h> #include<conio.h> main( ) { int num,rev,org; clrscr(); printf("\nEnter the number :"); scanf("%d",&num); rev=0; org=num; do { rev=rev*10+num%10; num=num/10; } while(num!=0); if(rev==org) printf("\nNUmber is Palindrome"); else printf("\nNumber is not palindrome"); getch(); } c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler,c programming practice questions pdf,c programming practice online,...

Do While Loop Syntax in C

                          Do While Loop Syntax Control Loop Definition With Example HERE Do While :- D o while loop first execute the loop and then it checks the condition if the condition is true it enters the loop next otherwise it come out. So this loop will run at least once. Syntax: Initialization; do { // body of the loop increment/decrement; }  while( condition checking); c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler,c programming practice questions pdf,c programming practice online,c programming coding questions and answers pdf,1...

Special Program Using While Loop

              Password Program Using While Loop #include<stdio.h> #include<conio.h> void main() { char ch,s[50]; int i; ch=getch(); i=0;   while(ch!='@') {     s[i]=ch;     printf("*");     ch=getch();         i++; }   s[i]='\0';     printf("\n\nYour Password : %s",s);      getch();  }   c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ compiler download,turbo c compiler,online c compiler,c compiler for windows,c++ compiler,online compiler online c++ compiler,gdb compiler,c programming practice questions pdf,c programming practice online,c programming coding questions and answers pdf,100 c programming exercises pdf c programming...

Factorial using While Loop in C

                        Find Factorial using while loop in C #include<stdio.h> #include<conio.h> void main() {        int num,fact;        printf("enter the value of num:");        scanf("%d",&num);        fact=1;           while(num>1)              {                 fact=(fact*num);                 num=num-1;              }        printf("%d",fact);        getch(); }        c programming language,c programming software,c programming download,c programming online,c programming examples,c programming tutorial,c programming code c programming w3schools,c++ c...

While loop example 2 in C

          Check password using While loop in C #include<stdio.h> #include<conio.h> void main() {             char ch,s[50];             int i;             ch=getch();             i=0;             while(ch!='@')             {                 s[i]=ch;                 printf("*");                 ch=getch();            ...