What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-09-01 04:21:02
Write a function digitsum that calculates the digit sum of an integer. The digit sum of an integer is the sum of all its digits.
#include <stdio.h> int getSum(unsigned long long n) { int sum = 0; for (; n; n /= 10) sum += n % 10; return sum; } int main(){ printf("Sum of digits = %d\n", getSum(555)); } Add solution -
Other 2021-09-01 01:46:01
how to find circumference of a circle
#include <stdio.h> #define PI 3.142 int main(){ float r, C, A; printf("What is the radius: \n"); scanf("%f", &r); C = 2 * PI * r; A = PI * r * r; printf("\nCincumference is and %f Area is %f\n&quo... Add solution -
C 2021-08-31 18:00:01
fcfs disk scheduling in c
/* This code is contributed by : Tanishq Vyas (github : https://github.com/tanishqvyas) */ #include <stdlib.h> #include <stdio.h> #include <unistd.h> //Header file for sleep() #include <pthread.h> int main(int argc, char cons... Add solution -
C 2021-08-31 15:58:01
find character from string c count
#include <stdio.h> #include <string.h> int main() { char s[1000],c; int i,count=0; printf("Enter the string : "); &n... Add solution -
Shell/Bash 2021-08-31 14:43:03
C program to design a digital clock
#include <stdio.h> #include <time.h>//for sleep() function #include <unistd.h> #include <stdlib.h> int main() { int hour, minute, second; hour=minute=second=0; while(1) { //clear output screen system("clear"); //print ti... Add solution -
Python 2021-08-31 11:20:01
Print Odd Even Negative Integer Count
#include<stdio.h> int main() { int n,i,e=0,o=0,ne=0; scanf("%d",&n); int a[n]; for(i=0;i<n;i++){ scanf("%d",&a[i]); if(a[i]<0) ne++; else if(a[i]%2==0&&a[i]>=0) e++; else o++; } printf("%d %d... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5