//图片文件合成器
#include <stdio.h>
#include<stdlib.h>
int main (void)
{
FILE *f_pic,*f_file,*f_finish;
char ch, pic_name[20],file_name[20],finish_name[20];
printf("请输入需要合成的图片和文件的名称:\n");
printf("图片:");
scanf("%s",pic_name);
......................
阅读全部
|
langmanxiang
贴于 2016年4月8日 16:12
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int sum=0;
char ch;
printf("请输入一串整数和任意含空格的数:");
while(scanf("%d",&i)==1)
{
sum+=i;
while((ch=getchar())==' ')
......................
阅读全部
|
langmanxiang
贴于 2016年4月8日 10:28
hide
bbsi
#include<stdio.h>
int addArray(int array[],int n);
int main(void)
{
int date[]={0,1,2,3,4,5,6,7,8,9};
int size=sizeof(date)/sizeof(date[0]);
printf("结果是:%d\n",addArray(date,size));
return 0;
}
int addArray(int array[],int n)
{
......................
阅读全部
|
langmanxiang
贴于 2016年4月8日 09:09
hide
bbsi
#include <iostream>
using namespace std;
double Average(double,double);
int main()
{
double a,b,average;
cout<<"Please enter two number:\n";
while (cin>>a>>b&&a!=0&&b!=0)
{
average=Average(a,b);
cout<<"Harmonic average: "<<average<<endl;
......................
阅读全部
|
langmanxiang
贴于 2016年4月7日 21:11
hide
bbsi
#include<stdio.h>
#include<string.h>
int t,n;
char str[100][101];
int searchMaxSubString(char *source){
int subStrLen=strlen(source),sourceStrLen=strlen(source);
int i,j;
bool foundMaxSubstr;
char subStr[101],revSubStr[101];
......................
阅读全部
|
yausgw
贴于 2016年4月6日 09:58
hide
bbsi
function y=xwin_one(x,a,fs)
x1=wavread('E:\gzan1.wav');
x1=filter([1-0.9375],1,x1);
N=120;step=10;
x2=enframe(x1,boxcar(N),step);
x=x2(1,:);
L=length(x);
m1=max(x);n1=min(x);
m=m1(1);n=n1(1);
for i=1:L %归一化取出的x 样点
x(i)=x(i)/m;
end
......................
阅读全部
|
mtbcx
贴于 2016年4月5日 17:45
hide
bbsi
菜鸟请教大神们。。。。
var b=" ";
if(b>=0 && b<=9){
alert("大");
}else{
alert("小");
}
为什么这个结果是大呢?
0和空字符串在javascript中都是false,所以0==" " 是true
......................
阅读全部
|
shenearth
贴于 2016年4月5日 11:12
hide
bbsi
/*用1+1/1!+1/2!+…+1/n!计算e的近似值*/
#include<stdio.h>
void main(){
int n, i, m;
double sum,h;
printf("enter a number:");
scanf_s("%d", &n);
m = 1; sum = 1;
//if (n < 34&&n>8){
for (i = 1; i <= n; i++){
m = m*i;
h = 1.0 / m;
......................
阅读全部
|
h2016
贴于 2016年4月2日 17:07
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
#include <time.h> //用到了time函数
int main()
{
int i,number;
FILE *fp;
int x=123;
srand((unsigned) time(NULL)); //用时间做种,每次产生随机数不一样
fp=fopen("input.txt","w");
if(fp==NULL)
{
......................
阅读全部
|
杏仁巧克力
贴于 2016年4月1日 09:16
hide
bbsi
//C++ Primer Plus -- Chapter 3--5
#include <iostream>
int main ()
{
using namespace std;
long double world;
cout<<"Enter the world's population:";
cin>>world;
cout<<"Enter the population of the USA:";
long double usa;
cin>>usa;
......................
阅读全部
|
langmanxiang
贴于 2016年3月30日 16:05
hide
bbsi