C语言作业:结构体编程练习 在屏幕上模拟显示一个数字式时钟 源代码能给我的话+50,感谢
程序运行正确,只是有一点点的小瑕疵,
for (t=0; t<50000000; t++)
控制一秒延迟,这里在我的系统上面,还需要加一个零,计时器才差不多相当于过1秒。
不知道LZ有什么潜在疑问呢?
我想用C语言写一个程序向女朋友表白,求源代码!!!
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define I 20
#define R 340
int main()
{
int i,j,e;
int a;
for(i=1,a=I;i<I/2;i++,a--){
for(j=(int) ( I-sqrt(I*I-(a-i)*(a-i)) );j>0;j--)
printf(" ");
for(e=1;e<=2*sqrt(I*I-(a-i)*(a-i));e++)
printf("3");
for(j=(int) ( 2*( I-sqrt(I*I-(a-i)*(a-i)) ) );j>0;j--)
printf(" ");
for(e=1;e<=2*sqrt(I*I-(a-i)*(a-i));e++)
printf("3");
printf(" ");
}
for(i=1;i<80;i++)
{
if(i==25){
printf(" I LOVE YOU! ");
i+=30;
}
printf("3");
}
printf(" ");
for(i=1;i<=R/2;i++){
if(i%2||i%3)continue;
for(j=(int) ( R-sqrt(R*R-i*i) );j>0;j--)
printf(" ");
for(e=1;e<=2*( sqrt(R*R-i*i) - (R-2*I) );e++)
printf("3");
printf(" ");
}
long time;
for(; ;)
{
system("color a");
for(time=0;time<99999999;time++);
system("color b");
for(time=0;time<99999999;time++);
system("color c");
for(time=0;time<99999999;time++);
system("color d");
for(time=0;time<99999999;time++);
system("color e");
for(time=0;time<99999999;time++);
system("color f");
for(time=0;time<99999999;time++);
system("color 0");
for(time=0;time<99999999;time++);
system("color 1");
for(time=0;time<99999999;time++);
system("color 2");
for(time=0;time<99999999;time++);
system("color 3");
for(time=0;time<99999999;time++);
system("color 4");
for(time=0;time<99999999;time++);
system("color 5");
for(time=0;time<99999999;time++);
system("color 6");
for(time=0;time<99999999;time++);
system("color 7");
for(time=0;time<99999999;time++);
system("color 8");
for(time=0;time<99999999;time++);
system("color 9");
for(time=0;time<99999999;time++);
system("color ab");
for(time=0;time<99999999;time++);
system("color ac");
for(time=0;time<99999999;time++);
system("color ad");
for(time=0;time<99999999;time++);
system("color ae");
for(time=0;time<99999999;time++);
system("color af");
for(time=0;time<99999999;time++);
}
return 0;
}
自学数电和模电之前要先学什么,需要哪些基础?
,你买的那两本书很好。学数电模电你必须先扎扎实实地把电路理论基础学好,数电对电路理论知识要求不高,模电就必须在学好电路的基础上去学习,不然无从学起。
高等代数。基础解系怎么求?要通用的方法。求AX=0的基础解系。
1、如何求基础解系:
设n为未知量个数,r为矩阵的秩。只要找到齐次线性方程组的n-r 个自由未知量,就可以获得它的基础解系。具体地说,我们先通过初等行变换把系数矩阵化为阶梯形,那么阶梯形的非零行数就是系数矩阵的秩。把每一个非零行最左端的未知量保留在方程组的左端,其余n-r 个未知量移到等式右端,再令右端 n-r个未知量其中的一个为1,其余为零,这样可以得到 n-r个解向量,这 n-r个解向量构成了方程组的基础解系。
2、AX=0的基础解系,例如:
(1)1 2 -3 -2
-2 3 5 4
-3 8 7 6
解: A-->
r2+2r1,r3+3r1,r2*(1/7)
1 2 -3 -2
0 7 -1 0
0 14 -2 0
r3-2r2
1 2 -3 -2
0 1 -1/7 0
0 0 0 0
r1-2r2
1 0 -19/7 -2
0 1 -1/7 0
0 0 0 0
基础解系为: a1=(19,1,7,0), a2=(2,0,0,1)
通解为: c1a1+c2a2, c1,c2为任意常数.