This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//C program to find the sum of odd and even numbers from 1 to N | |
#include <stdio.h> | |
int main() { | |
int sum_odd = 0; | |
int sum_even = 0; | |
int num; | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//C program to check whether a given integer is positive or negative | |
#include <stdio.h> | |
int main() { | |
int num; | |
printf("Enter a number: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
//swap function for swaping the value. | |
void swap(int *ptr1, int *ptr2); | |
int main() { | |
int num1, num2; | |
printf("Enter two number: "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int m, n; | |
printf("Enter num1 : "); | |
scanf("%d", &m); | |
printf("Enter num2 : "); | |
scanf("%d", &n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int num, | |
decimal_num, | |
reminder, | |
base = 1, | |
binary = 0, | |
no_of_1s = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int num, rem; | |
int sum = 0; | |
int i; | |
printf("Enter a number: "); | |
scanf("%d", &num); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//C Program to Check whether a given Number is Armstrong | |
#include <math.h> | |
#include <stdio.h> | |
int main() { | |
int rem, | |
sum = 0, | |
cube, | |
temp, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//C program to accept an integer & find the sum of its digits | |
#include <stdio.h> | |
int main() { | |
int num, digit; | |
int sum = 0; | |
int temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
struct complex { | |
int real_part, | |
imaginary_part; | |
}; | |
int main() { |
OlderNewer