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 bigmod(int a, int p, int m) | |
{ | |
int res = 1; | |
int x = a; | |
while(p) { | |
if(p&1) //odd | |
{ | |
res =(long long) (res*x)%m; |
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 input; | |
do { | |
printf("ODD input please: "); | |
scanf("%d",&input); | |
} | |
while (input%2==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 input; | |
do { | |
printf("input please"); | |
scanf("%d",&input); | |
} | |
while (input<=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(void) { | |
int input,binary=0,x; | |
//Take and see if input is a positive number | |
do { | |
printf("Please enter POSITIVE a number:"); | |
scanf("%d",&input);} | |
while(input<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> | |
//1,2,5,10,20,50 | |
int main() | |
{ | |
int amount; | |
int fiftytk=0,twentytk=0,tentk=0,fivetk=0,twotk=0,onetk=0; | |
printf("Enter your Taka for CHANGE:\t"); | |
scanf("%d",&amount); | |
int original_am=amount; |
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 countnums(int x); | |
int main() | |
{ | |
int input; | |
scanf("%d",&input); | |
printf("%d",countnums(input)); |
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 doseries(int inp); | |
int main() | |
{ | |
int input,i,j,n; | |
scanf("%d",&input); | |
n=doseries(input); | |
printf("\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> | |
void fprintArray(int arrayi[], int arrayLength); | |
int main() | |
{ | |
//counters to use in all loops | |
int i,j; |
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
//Function printArray : PRINTS a Integer Array | |
void fprintArray(int arrayi[],int arrayLength) | |
{ | |
int i; | |
for(i=0;i<arrayLength;i++) | |
{ | |
printf(" %d",arrayi[i]); | |
} |
OlderNewer