| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 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