原创 線下編程1-數字填充

#include <stdio.h> #include <string.h> int s[30][30]; int main() {  int i,j;  int n,m,k;  while(scanf(

原创 二分查找代碼練習

//binary search #include "stdio.h" int search (int a[],int n,int x); void main() { int i,x,z; int a[10]; printf("Please

原创 堆內存溢出

#include <stdio.h> #include <malloc.h> #include <string.h> #include <stdlib.h> #define FILENAME "myoutfile" int main(in

原创 銘記2

  也是在今天,女人答應了我,會和我一輩子在一起, 不離不棄 生死相依, 我想對我的女人說: 以後的日子可能會有很多的阻礙,很多的坎坷, 我也還不夠成熟,智商不夠高,甚至還有點死板, 我會盡快成長,.. 未來,我也不知道我會怎麼樣,貧窮

原创 error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.

編譯環境:RVMDK CPU :STM32F103VC 錯誤:.\obj\movSERVO.sct(7): error: L6235E: More than one section matches selector - cannot a

原创 stm32啓動模式

STM32三種啓動模式對應的存儲介質均是芯片內置的,它們是: 1)用戶閃存 = 芯片內置的Flash。 2)SRAM = 芯片內置的RAM區,就是內存啦。 3)系統存儲器 = 芯片內部一塊特定的區域,芯片出廠時在這個區域預置了一段Bo

原创 如何讓console程序以全屏窗口運行

有看到人問vc6,0編譯生成的exe文件怎麼樣能讓他全屏運行.本來這不算個問題,可是想想,最後還是想要說明一下這個; 1:命令行窗口在命令行可以下用 mode 命令進行自定義調整大小;   我們在命令行窗口下輸入 mode /? 可以得到

原创 線下編程2題-Peter的x

#include <stdio.h> #include <string.h> char s[300][300]; int main() {  int i,j;  char temp1,temp2;  int n;  while(scanf

原创 希爾排序 代碼

整理了一下希爾排序的代碼,基本上可以使用.如有發現問題,請指出來: void xier_sort(int a[],int n){ int k; int j; int temp; k=n/2; while(

原创 Fibonacci 數

#include<stdio.h> /*遞歸函數*/ int fib(int n) {  if(n==1||n==2)   return 1;  if(n>2)    return fib(n-1)+fib(n-2);   } int

原创 大數加法(瑕疵)

#include #include #include void BigAdd(char *s1,char *s2,int *d);char s1[100], s2[100];int d[102];int

原创 c++中new和delete修飾符與malloc和free函數的區別

//new修飾符和delete修飾符 #include <iostream> using namespace std; void main(void) { int arraysize; int *array; cin>>arrays