計(jì)算如下的函數(shù):y=2/x,當(dāng)x〈0;y=0,當(dāng)x=0;y=2x,當(dāng)x〉0.用scanf函數(shù)輸入x的值,求y 值.
計(jì)算如下的函數(shù):y=2/x,當(dāng)x〈0;y=0,當(dāng)x=0;y=2x,當(dāng)x〉0.用scanf函數(shù)輸入x的值,求y 值.
求求大哥大姐們幫我解決呀!
求求大哥大姐們幫我解決呀!
其他人氣:695 ℃時(shí)間:2020-04-06 22:30:51
優(yōu)質(zhì)解答
一樓那位朋友的可能你看不太懂.我還是來個(gè)看起來比較簡(jiǎn)單點(diǎn)的,適合你們這樣的初學(xué)者的方法 #include void main() { float x; float y; printf("請(qǐng)輸入x的值,x = "); scanf("%f",&x); if (x0) { y=2.0/x; printf ("y=...
我來回答
類似推薦
- c語言,編寫程序用scanf函數(shù)輸入x的值,計(jì)算并輸出y的值.
- 編寫程序?qū)崿F(xiàn)下列功能,函數(shù)y=x(x
- 設(shè)計(jì)程序框圖:依次計(jì)算并輸出函數(shù)y=x^4+2x^3+1當(dāng)x分別為2,4,6,8,10時(shí)的函數(shù)值
- 函數(shù)y=x²-2x+3的最大小值怎么算?
- 用秦九韶算法計(jì)算函數(shù)f(x)=2x4+3x3+5x-4,當(dāng)x=2時(shí)的函數(shù)值時(shí)乘法運(yùn)算進(jìn)行了( ?。┐? A.4 B.5 C.6 D.7
- 函數(shù)f(x)=sinx-cosx^2的最小值是?
- 英語翻譯
- I took my grandpa to the hospital this morning,_____ I missed the first class.
- So crazy
- 方差是各個(gè)數(shù)據(jù)與平均數(shù)之差的平方的平均數(shù)
- 函數(shù)y=f(x)與它反函數(shù)y=f^-1(x)怎么讀?
- These are photos of my families.Look at them 改錯(cuò)
猜你喜歡
- 1平面與平面重合,是否屬于平行一類?那重合的兩直線,也屬于平行一類的嗎?
- 2非洲每年因饑餓死亡的人數(shù)及現(xiàn)在饑餓人口數(shù)量拜托各位了 3Q
- 3decide to do sth.還=什么
- 4(7/8)o you think of london?B:5.____london is one of the liveliest cities
- 5啤酒可以托運(yùn)嗎
- 6邊長(zhǎng)為2√6的等邊三角形的中心到一邊的距離為?
- 7please give your hand to help me
- 8已知2的X次方等于3的Y次方等于6的Z次方不等等于1,證明X分之一加Y分之一等于Z分之一.
- 9幫我做做?
- 10機(jī)械分析天平TG628A的使用說明書
- 11in winter ,we wear warm coats to protect our bodies_.
- 12( )was most importance to her ,she told me,was her family it this what as