码迷,mamicode.com
首页 > 其他好文 > 详细

软件工程——股票利润

时间:2017-03-07 22:55:41      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:ios   names   max   for   name   main   turn   ret   ++   

#include "stdafx.h"
#include<iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
 int G[10]={1,3,4,8,3,11,8,4,6,8};
    int i,j,max=0;
 for(i=0;i<10;i++)
  for(j=0;j<i;j++)
      {  
  if(max<G[i]-G[j])
  max=G[i]-G[j];
  }
 cout<<"最大利润:"<<max;
 return 0;
}

软件工程——股票利润

标签:ios   names   max   for   name   main   turn   ret   ++   

原文地址:http://www.cnblogs.com/PanJQ/p/6516973.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!