随笔分类 - c语言
摘要:程序一 #define _________ } #define ________ putchar #define _______ main #define _(a) ________(a); #define ______ _______(){ #define __ ______ _(0x48)_(0x65)_(0x6C)_(0x6C) #define ___ _(0x6F)_(0x2C)_(0x20)_(0x77)_(0x6F) #define ____ _(0x72)_(0x6C)_(0x64)_(0x21) #define _____ __ ...
阅读全文
摘要:// student.cpp : 定义控制台应用程序的入口点。// #include"stdafx.h" #include<stdio.h> #include<string.h> struct student { char name[20]; int age; char sex; int nomber; float score; char telephone[100]; }; int main() { struct student stu1; strcpy(stu1.name,"杨文杰"); strcpy(stu1.telepho
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> int main() { char ch; //scanf("%c",&ch); ch=getchar(); switch(ch) { case 'A':printf("成绩为90分以上\n");break; case 'B':printf("成绩在80-90分之间\n");break; case 'C':printf("成绩在70-80分之间\n");bre
阅读全文
摘要:比如方程式ax*x+bx+c=0;其中需要讨论的情况有以下几种:1、a=0时不是二次方程;2、b*b-4*a*c=0,有两个相等实根;3、b*b-4*a*c>0,有两个不等实根;4、b*b-4*a*c<0,有两个共轭复根; 代码实现如下#include<stdio.h> #include<math.h> int main() { float a,b,c,disc,x1,x2,realpart,imagpart; scanf("%f%f%f",&a,&b,&c); printf("The equation&
阅读全文

浙公网安备 33010602011771号