What do you want to save?
Add Code snippet
New code examples in category C
-
Phoenix Logan 2022-05-13 11:50:52
factorial of number using recursion
//using recursion to find factorial of a number #include<stdio.h> int fact(int n); int main() { int n; printf("Enter the number: "); scanf("%d",&n); printf("Factorial of %d = %d", n, fact(n)); }... Add solution -
Awgiedawgie 2022-05-13 11:30:01
c++ image processing
// gcc version 6.3.0 (MinGW.org GCC-6.3.0-1) #include <stdio.h> #include<memory.h> #include<stdlib.h> const int BYTES_PER_PIXEL = 3; /// red, green, & blue const int FILE_HEADER_SIZE = 14; const int INFO_HEADER_SIZE = 40; void gene... Add solution -
Phoenix Logan 2022-05-13 11:05:02
cantidad de digitos recursiva
/*Escribir una función recursiva que devuelva la cantidad de dígitos de un número entero*/ int digitos(int n){ int res = 1; if(n < 10){//caso base res = 1; }else{ res = res + digitos(n/10); } printf("digito... Add solution -
Awgiedawgie 2022-05-13 10:36:47
Kruskal's algorithm in C
#include<bits/stdc++.h> using namespace std; int main() { int n = 9; int mat[9][9] = { {100,4,100,100,100,100,100,8,100}, {4,100,8,100,100,100,100,100,100}, {100,8,100,7,100,4,100,100,2}, {100,100,7,100,9,14,100,100,100}, {100,100,100,9,... Add solution -
Phoenix Logan 2022-03-27 21:35:04
Write a c code to create a data base of students using structure. The member variables are roll, grade, and marks. Create 3 structure variable of 3 different roll numbers and find out the roll number of the student who is having highest marks.
#include <stdio.h> struct student { char firstName[50]; int roll; float marks; } s[10]; int main() { int i; printf("Enter information of students:\n"); // storing information for (i = 0; i < 5; ++i) { ... Add solution
Best helpers
Ranking is empty