首页 > 其他分享 >实验1

实验1

时间:2023-03-08 13:12:13浏览次数:27  
标签:10 main return int 实验 printf include

#include <stdio.h>
int main()
{
    printf(" o \n");
    printf("<H>\n");
    printf("I I\n");
    

    return 0 ;
}

#include <stdio.h>
int main()
{
    printf(" o \n");
    printf("<H>\n");
    printf("I I\n");
    printf(" o \n");
    printf("<H>\n");
    printf("I I\n");

    return 0;
}

#include<stdio.h>
int main()
{
    printf(" o\to\n");
    printf("<H>\t<H>\n");
    printf("II\tII\n");
    
    
    return 0;
    
}

#include <stdio.h>

int main()
{
      int n, sum;
      
      scanf("%d", &n);
      
      
       sum = n/2*(n+1);
       printf("sum = %d\n", sum);
       return 0;
}

#include <stdio.h>
int main()
{
    int a, b, t;
       a = 3;
       b = 4;
       printf("a = %d, b = %d\n", a, b);
       t = a;
       a = b;
       b = t;
       printf("a = %d, b = %d\n", a, b);
       

       return 0;
}

#include <stdio.h>

int main()
{
    int x, t, m;
    x = 123;
    printf("x = %d\n", x);
    t = 0;
    m = x % 10;
    t = t *10 + m;
    x = x / 10;
    m = x % 10;
    t = t * 10 + m;
    x = x / 10;
    m = x % 10;
    t = t * 10 + m;
    x = x / 10;
    printf("t = %d\n", t);
    return 0;
}

#include<stdio.h>

int main()
{float a,b,c;
    scanf("%f%f%f",&a,&b,&c);
    if(a+b>c&a+c>b&b+c>a)

       printf("能构成三角形\n");
    else
    
       printf("不能构成三角形\n");
    return 0;
 } 

#include<stdio.h>
int main()
{
     int year;
     year = 1000000000/60/60/24/365;
    printf("10亿秒约等于%d年\n", year);    
     
}

#include <stdio.h>
#include<stdlib.h> 

int main()
{
    int n;
    n=rand()%41+60;
    printf("n = %d\n", n);
    return 0;
}

#include <stdio.h>
int main()
{
char ans1, ans2;
printf("每次课前认真预习、课后及时复习了没? (输入y或Y表示有,输入n或N表示没有) : ");
ans1 = getchar(); 
getchar(); 
printf("\n动手敲代码实践了没? (输入y或Y表示敲了,输入n或N表示木有敲) : ");
ans2 = getchar();
if((ans1 == 'y' || ans1 == 'Y') && (ans2 == 'y' || ans2 == 'Y'))
printf("\n罗马不是一天建成的, 继续保持哦:)\n");
else
printf("\n罗马不是一天毁灭的, 我们来建设吧\n");
return 0;
}

 

标签:10,main,return,int,实验,printf,include
From: https://www.cnblogs.com/63385404abcd/p/17191671.html

相关文章

  • 实验1
    1.实验任务1  task1_1#include<stdio.h>intmain(){printf("o\n");printf("<H>\n");printf("II\n");printf("o\n");......
  • python 多线程, 多进程, ProcessPoolExecutor. 有关GIL锁的问题实验.
    importtimeimportthreadingfrommultiprocessingimportProcessfromconcurrent.futuresimportProcessPoolExecutordeftime_decorator(func):defwrapper......
  • 实验一
    实验任务1task1-1源码print("hey,u")print('hey','u')x,y,z=1,2,3print(x,y,z)print('x=%d,y=%d,z=%d'%(x,y,z))print('x={},y={},z={}'.format(x,y......
  • 实验1 C语言开发环境使用和编程初体验
    实验任务1程序源码//打印一个字符小人#include<stdio.h>intmain(){printf("O\n");printf("<H>\n");printf("II\n");printf("O\n");printf("<H>\n");......
  • 自动化测试软件UFT实验
    功能测试 上机练习 1. 录制Flight程序登录的脚本。2. 脚本要求:(1) 使用Systemutil.Run打开程序。(2) 创建三个Action,分别命名为01_Login/02_New Order/03_Logout, 在A......
  • 实验1 Python初体验
    实验任务1实验源码1#实验123print('task1')  运行测试截图 实验结论: 实验任务2 实验任务3......
  • 实验1 C语言开发环境使用和编程初体验
    一.实践任务1//打印一个字符小人#include<stdio.h>intmain(){printf("o\n");printf("<H>\n");printf("II\n");return0;}  //打......
  • 实验1
    //打印一个字符小人#include<stdio.h>intmain(){printf("o\n");printf("<H>\n");printf("II\n");return0;} ......
  • 干货系列:高通量测序后的下游实验验证方法——m6A RNA甲基化篇|易基因
    大家好,这里是专注表观组学十余年,领跑多组学科研服务的易基因。此前,我们分享了m6ARNA甲基化研究的数据挖掘思路(点击查看详情),进而筛选出m6A修饰目标基因。做完MeRIP-seq测......
  • C语言实验一
    源程序1#include<stdio.h>intmain(){printf("0\n");printf("<H>\n");printf("II\n");return0;}程序截图1源程序1.2#include<stdio.h>......