全文预览

c程序设计及题解

上传者:菩提 |  格式:pdf  |  页数:63 |  大小:5313KB

文档介绍
sqrt (b*b-4*a*c))/2*a;\rx2=(-b-sqrt(b*b-4*a*c))/2*a;\rif(xl>x2)\rreturn xl;\relse\rreturn x2;\r/**/\r}\rvoid main()\r(\rfloat x;\rprintf (@zThe bigger root is %. 2f\nP, f (1, 5, 6));\rgetchO ;\r)\r18 . ÃĽj¯°±0ś\rLMscprog092.c,UVW?0strcmp 1 ( ) I@@YI@ÆÇÃĽ¯°±strl–\rstr20ś\rbc_.\r63\r#include <stdio. h>\rint strcmpl (const char* strl,const char* str2)\r(\r/**/\rwhile(*strl !=> \0* | |*str2!=, \0J)\r(\rif (*strl=*str2)\r(\rstrl++;\rstr2++;\r)\relse\rreturn (*strl-*str2);\r)\rreturn 0;\r/**/\r)\rvoid mainO\r(\rint com;\rchar* psi=Puvwx”, *ps2Puvwxyz”;\rclrscr ();\rcom=strcmpl (psi,ps2);\rif(com>0)\rp r i n t f p s i , ps2);\rif(com==0)\rprintf (z/%s=%sz@, psi, ps2);\rif(com<0)\rp r i n t f p s i , ps2);\rgetchO ;\r}

收藏

分享

举报
下载此文档