Search found 2 matches

by jeffprog
Wed Jan 21, 2015 3:22 am
Forum: Volume 2 (200-299)
Topic: 278 - Chess
Replies: 22
Views: 6926

Problem 278 (Chess)

What is wrong at my code? Please Help me...

#include <stdio.h>
#include <stdlib.h>

int minimo(int a, int b);

int main(){

int t;
char p;
int m;
int n;
int i;

scanf("%d",&t);
setbuf(stdin, NULL);

for(i=0;i<t;i++){

scanf("%c %d %d", &p, &m, &n);

setbuf(stdin, NULL);

if(p == 'Q ...
by jeffprog
Mon Jan 19, 2015 3:49 am
Forum: Volume 2 (200-299)
Topic: 278 - Chess
Replies: 22
Views: 6926

278 - Chess

What is wrong at my code?

#include <stdio.h>

int minimo(int a, int b);

int main(){

int t;
char p;
int m;
int n;
int i;

scanf("%d",&t);

for(i=0;i<t;i++){

fflush(stdin);

scanf("%c %d %d", &p, &m, &n);

if(p == 'Q'){

printf("%d\n", minimo(m,n));
}

if(p == 'r'){

printf("%d\n ...

Go to advanced search