573 - DS Online Judge Test Scoreboard

Time

2014/03/04 21:30:00 2014/03/04 22:20:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
5714 JudgeTest

5714 - JudgeTest   

Description

—Implement the functions in implement.cpp

 //implement.cpp

 

#include<stdio.h>

 

char studentID[20]  ;

 

//Implement these four functions**********

 

char* getStudentID();

int sum(int, int);

void swap(int *, int *);

void swap(int &, int &);

 

//****************************************

 

int main(){

 

  int a, b;

 

  scanf("%s%d%d", studentID, &a, &b);

 

  printf("Student ID is %s. ", getStudentID());

 

  printf("%d+%d=%d ", a, b, sum(a, b));

 

  swap(&a, &b);

  printf("a=%d b=%d ", a, b);

 

  swap(a, b);

  printf("a=%d b=%d ", a, b);

 

  return 0;

}

Input

123456789 10 100

Output

Student ID is 123456789. 10+100=110 a=100 b=10 a=10 b=100

Sample Input  Download

Sample Output  Download

Tags




Discuss