Category: C Refresh

05
Apr
2017

Sum of series

code: series: 1/1+1/2+1/3+….+1/N #include<stdio.h> int main() { int N,i; float sum; printf(“Enter N:”); scanf(“%d”,&N); sum=0; i=1; do{…

05
Apr
2017

Palindrome or Not

Code: int main() { int N,r,T; r=0; printf(“Enter number to check: “); scanf(“%d”,&N); T=N; do{ r=(r*10)+(T%10); T=T/10;…

05
Apr
2017

Find sum of digits of a given number in C

Code: With While Loop #include<stdio.h> int main() { int N,r,sum; sum=0; printf(“Give a number:”); scanf(“%d”,&N); while(N!=0) {…

04
Apr
2017

C refresh for logic development

Code: #include<stdio.h> int main() { int N1,N2,ch,resi; float resf; do { printf(“\n\n Enter value for operation:”); printf(“\n…