#include <stdio.h>
#include <math.h>
int main ()
{
double a,b,c,deta,x1,x2,p,q;
scanf("%lf%lf%lf",&a,&b,&c);
deta=b*b-4*a*c;
p=-b/(2*a);
q=sqrt(deta)/(2*a);
x1=p+q;x2=p-q;
printf("x1=%7.2f+%-7.2fi\nx2=%7.2f-%-7.2fi\n",p,q,p,q);
return 0;
......................
阅读全部
|
韩锡秀
贴于 2020年11月9日 20:44
hide
bbsi
import random
'''
实现一个猜数字小游戏,随机生成一个0~100以内的数据,由玩家来猜
每次猜完之后计算机告诉玩家是猜大了还是猜小了
共5次机会,5次猜不出来宣布游戏失败。
'''
class GuessNum:
......................
阅读全部
|
SunCZ
贴于 2020年11月9日 18:24
hide
bbsi
Option Explicit
Public b
Public index
Public TCount As Integer''时钟刷新次数
'抽签30个,点击抽签显示数字,不重复(抽一个少一个)
Private Sub Form_Load()
Timer1.Enabled = False
index = 1
Randomize
ReDim b(1 To 1) As Integer
......................
阅读全部
|
ysz123
贴于 2020年10月26日 10:48
hide
bbsi
string dbname = Server.MapPath("App_Data/basketball.mdb");
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=" + dbname);
conn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select qian from t_arranges where quautity<2", conn);//quautity字段表示被抽次数
DataSet ds = new DataSet();
da.Fill(ds, "t_table");
DataRow[] rows = ds.Tables[0].Select();
int counts = rows.Length;
if (counts > 0)
else
{
......................
阅读全部
|
ysz123
贴于 2020年10月26日 10:42
hide
bbsi
string dbname = Server.MapPath("App_Data/basketball.mdb");
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=" + dbname);
conn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select qian from t_arranges where quautity<2", conn);//quautity字段表示被抽次数
DataSet ds = new DataSet();
da.Fill(ds, "t_table");
阅读全部
|
ysz123
贴于 2020年10月26日 10:42
hide
bbsi
#include<stdio.h>
int main()
{
int a,b,n,i;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %d",&a,&b);
printf("%d\n",a+b);
}return 0;
}
阅读全部
|
小神女
贴于 2020年10月24日 16:41
hide
bbsi
#include<stdio.h>
int main()
{
int i,n,a,b;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %d",&a,&b);
if(a>b)
{
printf("%d\n",a);
}
......................
阅读全部
|
小神女
贴于 2020年10月24日 16:40
hide
bbsi
#include<stdio.h>
int main()
{
int n,a,b,i;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %d",&a,&b);
if(a==b)
{
printf("These numbers are equal.\n");
}
......................
阅读全部
|
小神女
贴于 2020年10月24日 16:38
hide
bbsi
#include<stdio.h>
int main()
{
printf("hello");
return 0;
}
阅读全部
|
GWhoney
贴于 2020年10月14日 19:22
hide
bbsi