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 number = 48; | |
if ( number > 48 ) | |
{ | |
printf("The number you entered is %d.\n", number); | |
} | |
return 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 a = 1; | |
if (a); | |
{ | |
printf("hello"); | |
} | |
else | |
{ |
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(void) | |
{ | |
int number = 0; | |
int digit = 0; | |
int sum = 0; | |
printf("Enter the five digit number : "); | |
scanf("%d", &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(void) | |
{ | |
int a = 5; | |
if ( a > 10 ) | |
{ | |
printf("This was printed from inside if\n"); | |
} | |
else |
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 cp = 0, sp = 0, result = 0; | |
printf("Enter the CP : "); | |
scanf("%d", &cp); | |
printf("Enter the SP: "); |
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> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
//Complete the following function. | |
void calculate_the_maximum(int n, int k) | |
{ | |
//Write your code here. |
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> | |
void dec_to_bin(int n); | |
int main() | |
{ | |
int x = 4; | |
dec_to_bin(x); | |
printf("\n4 << 1\t"); | |
dec_to_bin(x << 1); |
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> | |
#include <stdlib.h> | |
#define SIZE 20 | |
#define METER_CHARGE 50 | |
double make_bill(); | |
int main() | |
{ | |
make_bill(); |
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
def fibonacci_sequence(num1): | |
list1 = [] | |
if num1 == 0: | |
list1 = list1 | |
elif num1 == 1: | |
list1.append(0) | |
elif num1 == 2: | |
list1.extend([0, 1]) | |
else: | |
list1.extend([0, 1]) |
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
def generate_text(str1, str2, num1): | |
print("{}, go to gate {} for flight {}.".format(str1, num1, str2)) | |
generate_text("Sam Roger", "AI221", 12) | |
generate_text("Tanya Patel", "AC123", 3) |
OlderNewer