This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
main() { | |
int n; | |
while(cin>>n){ //輸入n個數字 | |
int a[n]; | |
for(int i = 0 ; i < n ; ++i){ | |
cin >>a[i]; //輸入數列 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//尋找輸入n個數字數列中 加起來最小的子數列 | |
#include <iostream> | |
using namespace std; | |
int main() { | |
int n; | |
while(cin>>n){ | |
int a[n]; | |
int startflag=0,endflag=0; | |
for(int i = 0 ; i < n ; i += 1){ //輸入數列 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
int l,M=3,i,j=0,num[10]={0}; | |
char array[16]; | |
printf("請輸入幾組數字:\n"); | |
scanf("%d",&M); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <reg51.h> //8051????? | |
#define seg7 P1 | |
#define segs P2 | |
#define PB P0 | |
void scanner(int); | |
void delay(int); //????????? | |
int flag; | |
char seg[10]={0xc0,0xf9,0xa4,0xb0,0x99, //???????? |