lesson009lesson010作业

zzdoit zzdoit     2022-08-04     639

关键词:

lesson009  作业 厘米 to  英尺

代码:

 1 #include <stdio.h>
 2 int main()
 3 {
 4 // 1 100 厘米 到 英尺 
 5 // 2 printf 1 1*0.0328
 6 // 3 printf 2 2*0.0328
 7 //
 8 for (int i = 1; i<= 100; i++)
 9 {
10 printf("%d 厘米 = %f 英尺 \n",i,i*0.0328);
11 }
12 getchar();
13 return 0;
14 }

 

 

lesson-10  作业 

1   使用正史的占位符打印出int,long, long long 的最大值和最小值(有符号)

代码:

#include <stdio.h>
#include <stdlib.h>
#include <limits.h> // limits.h 重新定义整形的极限值

//1 使用正确的占位符打印出int,long, long long 的最大值和最小值(有符号)
int main()
{
int ix = INT_MAX; //#define INT_MAX 2147483647 // maximum (signed) int value int的最大值
long ly = LONG_MAX;
long long llz = LLONG_MAX;

printf(" int的最大值 = %d\n long的最大值 = %ld\n long long的最大值 = %lld\n",ix,ly,llz);
printf(" int的最小值 = %d\n long的最小值 = %ld\n long long的最小值 = %lld\n", ix + 1, ly + 1, llz + 1);
getchar();
}

 

 

2  请写出一个16进制的数溢出有符号和无符号的long型

int main()
{
    long la = LONG_MAX;
    printf("有符号long数据16进制的溢出数是: %lx\n",la+1);
    
    printf("无符号long数据16进制的溢出数是: %x\n", la+1);


    getchar();
    //return 0;
}

 

 

 

 

3  -12345在无符号int中值为多少

 

int main()
{
    int a = -12345;
        printf("-12345在无符号int中的值是: %u \n", a);
    getchar();
}

 

lesson0011作业

#include<stdio.h>//请使用转义字符输出/???和/////aintmain(){/*chars=‘/‘;*//*printf("%c",s);*/printf("/");printf("?");printf("?");printf("?");printf(" ");printf("/");printf("/");printf("/");printf(" 查看详情

lesson19循环语句作业

#include<windows.h>#include<math.h>#defineWINMAXIMUM100HWNDg_hwnds[WINMAXIMUM]={0};intg_winnum=0;BOOLCALLBACKEnumWindowsProc(_In_HWNDhwnd,_In_LPARAMlParam){charclassname[MAXBYTE]={0};GetCl 查看详情

lesson17.18语句作业

假设所有的变量都为int型,请写出下列各项变量的值:y=x=(2+3)/4答:5/4得到的是float,赋值给int,没有强制转换,x=0 y=0y=4*8/(x=2*8)答:x=16y=2x=(int)3.3+3.111答:x=0y=30.0/4.0*5.0答:y=0x=30/4.0*5答:x=0请写出程序打印出来的值intnum=10;printf(&... 查看详情

lesson16_sanf_s作业

不运行任何代码写出下面语句的执行结果(未知的值请写为未知及理由)printf("%2.2lf",2.33333);答:2.33  小数点前如实显示,小数点后面显示2位printf("%c%c%c",‘A‘,‘49‘,‘44‘);答:A 三个字符都带单引号,打印字符本身c... 查看详情

react-native-lesson

一、React-Native入门指南lesson1:HelloReact-Nativelesson2:认识代码结构lesson3:css和布局lesson4:学会React-Native布局(一)lesson5:学会React-Native布局(二)lesson6:UI组件lesson7:JSX在React-Native中的应用lesson8:自己动手写组件lesson9:ReactNative和 查看详情

vi/vim教程

Lesson1 Lesson2  Lesson3  Lesson4  Lesson5  Lesson6  Lesson7  查看详情

[codility]lesson1&lesson2(代码片段)

 Lesson1 A binarygap withinapositiveintegerNisanymaximalsequenceofconsecutivezerosthatissurroundedbyonesatbothendsinthebinaryrepresentationofN.Forexample,number9hasbinaryrepresentation 1001 andcontainsabinarygapoflength2.Thenumber529hasbinaryrepresentation 1000010001 andcontainstwobinarygaps... 查看详情

[machinelearningfortrading]ud501lesson23:03-03assessingalearningalgorithm|lesson24:(代码片段)

AcloserlookatKNNsolutions   WhathappensasKvaries    WhathappensasDvaries     Metric1RMSError    InSamplevsoutofsample&nb 查看详情

lesson24askeletoninthecupboard

Weoftenreadinnovelshowaseeminglyrespectablepersonorfamilyhassometerriblesecretwhichhasbeenconcealedfromstrangersforyears.TheEnglishlanguagepossessesavividsayingtodescriblethissortofsituation.Theterrib 查看详情

lesson14anoblegangster

TherewasatimewhentheownersofshopsandbusinessesinChicagohadtopaylargesumsofmoneytoganstersinreturnfor‘protection‘. Ifthemoneywasnotpaidpromptly,thegangsterswouldquicklyputamanoutofbusinessbydestro 查看详情

lesson22aglassenvolops

TextMydaughter,Jane,neverdreamedofreceivingaletterfromagirlofherownageinHolland.Lastyear,weweretravelingacrosstheChannelandJaneputapieceofpaperwithhernameanaddressonitintoabottle.Shethrowthebottleinto 查看详情

1001001_lesson1&2

 Lesson1  Excuseme!对不起!Listentothetapethenanswerthisquestion.Whosehandbagisit?听录音,然后回答问题。这是谁的手袋?  NewWordsandexpressions生词和词语  Notesonthetext  课文注释  参考译文   Lesson2  Isthisyour...?这是你的... 查看详情

0301001_lesson1&2

 Lesson1  Excuseme!对不起!Listentothetapethenanswerthisquestion.Whosehandbagisit?听录音,然后回答问题。这是谁的手袋?  NewWordsandexpressions生词和词语  Notesonthetext  课文注释  参考译文   Lesson2  Isthisyour...?这是你的... 查看详情

lesson21danielmendoza

BoxingmatcheswereverypopularinEnglandtwohundredyearsago.Inthosedays,boxersfoughtwithbarefistsforprizemoney.Becauseofthis,theywereknownas‘prizefighters‘.However,boxingwasverycrude,fortherewerenorulesan 查看详情

lesson1#06数据类型

Python中的数据类型: 查看详情

[machinelearningfortrading]ud501lesson25:03-05reinforcementlearning|lesson26:03-06q-(代码片段)

TheRLproblem   TradingasanRLproblem     MappingtradingtoRL    Markovdecisionproblems     Unknowntransitionsandrewar 查看详情

第一册:lesson125.

原文:Teafortwo。question:DoesSusanhaveteabyherself?Can‘tyoucomeinandhaveteanowPiter?Notyet.Imustwaterthegardenfirst.Doyouhavetowateritnow?I‘mafraidImust.Lookatit.It‘sterriblydry.Whatanuisance.Lastsummeri 查看详情

unit与lesson的区别是啥

记得我们上学时第几课都是用lesson表示,可孩子现在学的幼儿英语书上却是unit,我不知道他们有什麽区别呢,请帮忙解答,谢谢参考技术Aunit是单元的意思,比如unit1第一单元,它可以包含lesson(是课的意思) 查看详情