第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

這是我的代碼,可就是不知道怎么改,求大神幫忙!

這是我的代碼,可就是不知道怎么改,求大神幫忙!

C
慕容708150 2023-04-22 23:19:23
老師讓我用c語言畫一個(gè)小球平拋軌跡圖#include <winbgim.h>#include <conio2.h>#include <math.h>#include <time.h>#define PI 3.1415926int main(){time_t now;int x,y;initwindow(1000,700); //open a 640x480 graphics windowsetcolor(WHITE); circle(100,50,10); //Draw a circlefloodfill(100,50,WHITE);//在圓內(nèi)填充白色; bar(0,60,100,65);//上面板 bar(100,565,850,570);//下面板setcolor(WHITE);now=time(NULL); setwritemode(1);while(now==1000){x=100+100*now;y=50+(1/2)*10*now*now;setcolor(WHITE);cricle(x,y,10);delay(1000/24);cricle(x,y,10);  }getch(); //wait for user to press a keyclosegraph(); //close graphics windowreturn 0;}
查看完整描述

1 回答

?
蠱毒傳說

TA貢獻(xiàn)1895條經(jīng)驗(yàn) 獲得超3個(gè)贊

circle函數(shù)是TURBO C提供的圖形接口,用來畫圓。不屬于標(biāo)準(zhǔn)庫函數(shù),不具備可移植性。
函數(shù)名:circle
功 能: 在給定半徑以(x, y)為圓心畫圓
用 法:void far circle(int x, int y, int radius)

隨時(shí)間變化,可以用cleardevice函數(shù)清除屏幕,不斷畫半徑不同的圓??雌饋砭拖袷且粋€(gè)隨時(shí)間變化的圓形。

函數(shù)名: cleardevice
功 能: 清除圖形屏幕
用 法: void far cleardevice(void);
例程:

#include <graphics.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>int main(void){/* request auto detection */int gdriver = DETECT, gmode, errorcode;int midx, midy;int radius = 100;/* initialize graphics and local variables */initgraph(&gdriver, &gmode, "");/* read result of initialization */errorcode = graphresult();if (errorcode != grOk) /* an error occurred */{printf("Graphics error: %s\n", grapherrormsg(errorcode));printf("Press any key to halt:");getch();exit(1); /* terminate with an error code */}midx = getmaxx() / 2;midy = getmaxy() / 2;setcolor(getmaxcolor());for(i=0;i<1000000;i++) if(i%50000==0){    cleardevice();/* clean the screen */    circle(midx, midy, radius--);/* draw the circle */}getch();closegraph();return 0;}
查看完整回答
反對(duì) 回復(fù) 2023-04-26
  • 1 回答
  • 0 關(guān)注
  • 203 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)