What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-14 03:42:08
add a 'protected' constructor or the 'static' keyword to the class declaration program.cs
public class Program { protected Program() { // Do something. } public static Program Create() { // 100% Allowed. return new Program(); } public void DoSomething() { } } public static class A... Add solution -
C 2021-11-13 00:22:15
c program to find number of days in a month using switch case
/** * C program to print number of days in a month using switch case */ #include <stdio.h> int main() { int month; /* Input month number from user */ printf("Enter month number(1-12): "); scanf("%d", &mo... Add solution -
C++ 2021-11-12 21:23:17
gfg cyclic array rotation
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution -
C 2021-11-07 01:59:12
Rotation of array in C++
// C program to rotate an array cyclically #include <stdio.h> void rightRotateByOne(int arr[], int n) //function for cyclically rotating an array once { int x = arr[n-1], i; for (i = n-1; i > 0; i--) arr[i] = arr[i-1]; arr[0] = x... Add solution -
Other 2021-11-01 22:50:11
electricity bill program inc#
/** * C program to calculate total electricity bill */ #include <stdio.h> int main() { int unit; float amt, total_amt, sur_charge; /* Input unit consumed from user */ printf("Enter total units consumed: "); scanf(&... Add solution -
C 2021-10-25 03:17:10
how to create a file in c
/** * C program to create a file and write data into file. */ #include <stdio.h> #include <stdlib.h> #define DATA_SIZE 1000 int main() { /* Variable to store user content */ char data[DATA_SIZE]; /* File pointer to hold refer... Add solution -
Other 2021-10-20 09:07:03
valid triangle using angles
/** * C program to check whether a triangle is valid or not if angles are given */ #include <stdio.h> int main() { int angle1, angle2, angle3, sum; /* Input all three angles of triangle */ printf("Enter three angles of triangle... Add solution