assignment 2 - khu.ac.krhaptics.khu.ac.kr/pb/assignment2.pdf · 2014-08-11 · function ( cj...

Post on 10-Mar-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Assignment 2

2

Assignment 2

3

#include <iostream>using namespace std;

Int plus(int, int);Int minus(int, int);void multi(int, int, int&);Void division(int, int, float&);

void main(){

}

Variables declaration

Getting user inputs

Call four functions

Print results

Define the four functions

Assignment 2

4

Assignment 2

5

#include <iostream>using namespace std;

int Cal_year_day(int, int);int Cal_month_day(int, int);int Cal_day(int, int);

void main(){

}

int today_year = 2014;int today_month = 4;int today_day = 5;

int year, month, day; //for input int diff_year_day, diff_month_day, diff_day; //for saving return values

Call three functions

Calculate the sum of return values and print

Definitions of the three functions

top related