这几年一直在学VBA,对VB也稍懂一些。不过这两个语言有些部分是相同的,现在开始学VB喽。
# include <stdio.h># include <sys/timeb.h>int main(void){ timeb t1, t2; long t; int i, n; double x, sum1, sum; sum1 = 1; sum = 1; printf("Please input x and n: "); scanf("%lf%d", &x, &n); ftime(&t1); //求的当前时间 for (i=1; i<=n; ++i) { sum1 *= -1....
今年开始C++咯
吼一下先
指针
绕得人好晕,呵呵,休息了,明天重新再看一遍
我并不是主角,因为我没资本!
使用VC6.0编译器,关闭时,出现:
You cannot close the workspace while a build is in progress. Select the stop Build command before closing the workspace
解决方案:
One advice is to update to the latest service pack (SP6).更新服务包。1. Do not build simultaneously in multiple instances.2. Do not run any other instance ...
求会写的人帮写几个程序~~~
1. 请编写函数float fun(float x, int m),它的功能是:将浮点数x保留m位小数(m不大于6),第m+1位四舍五入。例如,输入123.456,保留2位小数应输出123.46(或123.459999)。
2. 请编写一个函数unsigned fun ( unsigned w ), w是一个大于10的无符号整数,若w是n (n≥2)位的整数,函数求出w的后n-1位的数作为函数值返回。
3. 编写一个函数fun,函数fun的功能是:从低位开始取出长整型变量s中偶数位上的数,依次构成一个新数放在t中。例如,当s中的数为:7...
#include <stdio.h>float calc(float x,char op,float y);int main() { float num1=0,num2=0,num3=0,temp=0; char op[2][2]={0}; printf("Input expression:" ); scanf("%f",&num1); scanf("%c",&op[0][0]); scanf("%f",&num2); scanf("%c",&op[0][1]); scanf("%f",&num3); if(op[0][0]=='+'||op...
搬宿舍了 累啊
古人有云: 授人以鱼不如授人以渔! 成不欺我!
# include <stdio.h>
int main (void){ float a, b, t;
printf("请输入两个浮点型的数据:\n"); scanf("%f %f\n", &a, &b);
if (a > b)//互换两个数 { t = a; a = b; b = t; }
printf("a = %f b = %f\n", a, b); return 0;}
!回家了
刚刚来到bccn,请大家多多关照。我是一个小菜鸟,希望大虾们能指点一下小弟。
新手求前辈们多多指教!
#include <reg52.h> #define uchar unsigned char#define uint unsigned intuchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};sbit wela=P2^7;sbit dula=P2^6;sbit test=P1^7;sbit Trig=P1^0;sbit Echo=P3^2;sbit succeed_flag=P1^2;uint time,timeH,timeL...
我是学习编程的,学过的编程语言有c,java,html,css,javascript。刚开始学习C语言的时候,不知道main()方法的功能,常用的库(比如stdio.h,math.h,conio.h),更严重的是不知道"%d"代表啥含义,最严重的是不知道怎样保存一个文件。
在老师、同学、和我自己帮助下,每天晚上看C程序,每天用心写一两个程序,让程序像诗歌一样呈现出来。尤其在调试C程序时,用的是Turb2.0。经历一年多的时间,渐渐懂得数据类型、函数、指针的定义和用法。
学习java的时候,为了搞懂类和对象的区别,我们几个同学常常聊到晚上十一点左右。想想大学生活,...
public class SysTem{
public static void main(String args[]){
System.out.println("Hello,world");
}
}
//Hello,world Java SE
void output()
{
int a,b;
clrscr();
printf("input two number\n");
scanf("%d%d",&a,&b);
printf("%4d%4d",a,b);
}
void main()
{
output();
}
//使用main()方法调用output()方法
想着想着就哭了,
今天下雨了。。早晨的时候,鞋子湿了。