原创 NEUQ1038: 譚浩強C語言(第三版)習題4.8
之前沒做對的一道題,今天集中清理一下。 //------------------- 很水的題,主要是 %.2lf 不能四捨五入,需要僅保留兩位小數,用了醜陋的強制類型轉換。。。 //------------------#include<s
原创 7-003幾何形體面積排序,有錯,待改
#include<stdafx.h> #include<iostream> #include<stdio.h> #include<math.h> using namespace std; class CShape{ public: v
原创 C# 無邊框窗口實現拖動
原文地址:http://blog.csdn.net/sky___ice/article/details/11533321 Form1.Designer.cs: // //Form1 // this.MouseDo
原创 【程序設計實習】筆記 6--002複合關係
//人狗關係 #include<iostream> using namespace std; class Cmaster; class Cdog{ Cmaster *pm; }; class Cmaster { Cdog *dogs[
原创 2015年9月10日 去掉字符串左右空格,中間空格僅保留一個
當時用c寫的,挺長的。今天看到了java簡直是流氓。 public static void main(String[] args) { String str=" aksdjf f f fjiadf ";
原创 NEUQ1055譚浩強C語言(第三版)習題6.11
//迭代公式不是很理解,寫出來算了。。#include <stdio.h> #include <math.h> int main() { double x0,x1; int a; scanf("%d",&a);
原创 2015年9月10日 struts2TEST
action包下SuiBianAction.java package action; import com.opensymphony.xwork2.Action; import com.opensymphony.xwork2.Acti
原创 NEUQ1051: 譚浩強C語言(第三版)習題6.7
//C代碼簡直難看到家,求大神知道如何寫出複用性好的,維護性強的代碼。。。 //格式錯誤了好幾次,最後發現是are和數字之間多了個空格。。。。。。本來一直以爲是最後的換行多了,費勁搞掉了。 #include<stdio.h> #inclu
原创 2015年8月13日 O(n)fibonacci
#include<stdio.h> /* long long fib(int x) { if(x<=0) return 0; if(x==1) return 1; return fib(x-1)+fib(x-2); } long
原创 C# 佔位符
在c#中有兩種方式可以輸出多個字符 其中的一種: static void Main() { string c=Console.ReadLine();
原创 2014藍橋杯問題 C: 神奇算式
沒做完,先搞答題了 #include <stdio.h> #include<string.h> #include<stdlib.h> int comp(const void *a,const void *b) { return *(
原创 【程序設計實習】筆記 6--001繼承
//CanBaoYan。。 //考慮到明年還要水藍橋杯,還是學學c++把 #include<iostream> using namespace std; class CStudent{ private: string sN
原创 2014年藍橋杯預選賽 C/C++ 本科A組試題--切面條
//主要是要找到f(n)=2*f(n-1)-1的規律. #include <stdio.h> #include <math.h> int f(int n) { if(n==0) return 2; else return 2*f(n
原创 【程序設計實習】筆記 6-005 間接基類
#include<iostream> using namespace std; class Base{ public: int n; Base(int i):n(i) { cout<<"Base "<<n<<" co
原创 2015年7月30日19:22:31--第一天Oracle的sql文件
`–SELECT ename,(sal*6+sal*6*1.2) worksal,(sal*6+sal*6*1.2)+nvl(comm,0)*12 totalsal FROM emp –St –ELECT ename ||job||s