Week 3 hands-on practice project 3-playing pointer on OJ (4)

Source: Internet
Author: User

Week 3 hands-on practice project 3-playing pointer on OJ (4)

Problem and code

/** Copyright (c) 2014, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Xin Bin * Completion Date: July 15, December 4, 2014 * version number: v1.0 ** Problem description: The following program, enter two integers, after calling the function ast, the sum of the two numbers and the difference between the two numbers are output. * Input Description: two integers. * Program output: the sum of two numbers and the difference between the two. */# include

 
  
Using namespace std; void ast (int x, int y, int * cp, int * dp) {// definition of the completion function * cp = x + y; * dp = x-y;} int main () {int a, B, c, d; cin> a> B; // call the ast (, b, & c, & d); cout <

  

   
Running result:

Learning sentiment: continue to change the medicine without changing the changes ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.