This file contains hidden or 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 current_row, total_upper_row, star, space; | |
printf("Please enter a number: "); | |
scanf("%d", &total_upper_row); | |
for(current_row = 1; current_row <= total_upper_row; current_row++) | |
{ | |
for(star = total_upper_row - current_row + 1; star >= 1; star--) |
This file contains hidden or 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> | |
int main() | |
{ | |
char str1[] = "********************************************"; | |
char str2[] = " "; | |
int space = 1, star, total; | |
scanf("%d", &star); |
This file contains hidden or 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> | |
int main() | |
{ | |
int bars, coupon; | |
while(scanf("%d", &bars) != EOF) | |
{ | |
coupon = bars; |
This file contains hidden or 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> | |
int main() | |
{ | |
char str1[] = "********************************************"; | |
char str2[] = " "; | |
int space = 1, star, initial_star; | |
scanf("%d", &star); |
This file contains hidden or 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
/* | |
READ THE QUESTIONS CAREFULLY! | |
EVERY WORD REGARDING ALGORITHM, INPUT, OUTPUT, ETC. MUST BE CAREFULLY READ AND FOLLOWED. | |
eg. Think of swapping the input; be cautious on the output format!!! | |
What the statements said in the questions count, not my personal judgement! | |
The f****** "output order must be the same as input" statement caught me off guard TWICE! Learn the lesson. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains hidden or 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> | |
/* | |
ACM doesn't take %I64d\n, they take %lld\n only. | |
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=12&problem=996&mosmsg=Submission+received+with+ID+14345306 | |
*/ | |
int main() | |
{ |
This file contains hidden or 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> | |
int main() | |
{ | |
long long int equal_parts; | |
while(scanf("%lld", &equal_parts) != EOF) | |
{ | |
if(equal_parts < 0) | |
break; |
This file contains hidden or 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() | |
{ | |
long long int input_1 = 0, input_2 = 0; | |
while(scanf("%lld %lld", &input_1, &input_2) != EOF) | |
printf("%lld\n", (input_1 - input_2 >= 0) ? input_1 - input_2 : input_2 - input_1); | |
return 0; | |
} |
This file contains hidden or 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> | |
/* | |
http://uva.onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&page=show_problem&category=&problem=1753&mosmsg=Submission+received+with+ID+14388286 | |
*/ | |
int main() | |
{ |
This file contains hidden or 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> | |
/* | |
http://uva.onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&page=show_problem&category=&problem=1753&mosmsg=Submission+received+with+ID+14388286 | |
*/ | |
int main() | |
{ | |
int total_cases, count = 0, input_1, input_2; | |
scanf("%d", &total_cases); |
OlderNewer