c

75 #include"stdio.h"
void main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=6-i;j++)
           printf(" ");
        for(j=1;j<=5;j++)
            printf("*");
        printf("\n");
    }   
}
76#include"stdio.h"
void main()
{
    int i,j;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
           printf(" ");
        for(j=1;j<=5;j++)
            printf("*");
        printf("\n");
    }   
}
```c
77#include"stdio.h"
void main()
{
    int i,j;
    for(i=1;i<=6;i++)
    {
        if(i%2==0)
        {
           for(j=1;j<=2;j++)
                 printf(" ");
           for(j=1;j<=6;j++)
                 printf("*");
           printf("\n");
        }
        else
        {
            for(j=1;j<=6;j++)
                 printf("*");
            printf("\n");
        }
    }   
}

``
```c
78#include"stdio.h"
void main()
{
    int i,j;
    for(i=1;i<=6;i++)
    {
        if(i%2==0)
        {
           for(j=1;j<=2;j++)
                 printf(" ");
           for(j=1;j<=6;j++)
                 printf("*");
           printf("\n");
        }
        else
        {
            for(j=1;j<=6;j++)
                 printf("*");
            printf("\n");
        }
    }   
}

79#include"stdio.h"
void main()
{
    int num;
    printf("please input the num:\n");
    scanf("%d",&num);
    printf("the result is :%d\n",(num%10)*(num/10));
}

80#include<stdio.h>
#include<math.h>
int main()
{
    float a,b,c,disc,x1,x2,p,q;
    disc=0;
    scanf("%f%f%f",&a,&b,&c);
    disc=b*b-4*a*c;
    p=-b/(2.0*a);
    q=sqrt(disc)/(2.0*a);
    x1=p+q;
    x2=p-q;
    printf("x1=%7.2f\nx2=%7.2f\n",x1,x2);
}

81#include<stdio.h>
int main()
{
    char ch;
    ch=getchar();
    if(ch<'A'||ch>'Z')
    {
       printf("输入的不是大写字母,请重新输入!\n");
    }
    ch=ch+32;
    putchar(ch);
    putchar('\n');
} 
82#include <stdio.h>
#include <conio.h>
void main ()
{
    double a,b,c;
    char op;
    printf ("请输入两个运算数,空格隔开\n");
    scanf ("%lf %lf",&a,&b);
    fflush(stdin);    //清空缓冲区m
    printf ("请输入运算符\n");
    scanf ("%c",&op);
    switch(op)
    {
        case '+':c=a+b;break;
        case '-':c=a-b;break;
        case '*':c=a*b;break;
        case '/':c=a/b;break;
    }
    printf ("计算结果为%lf\n",c);
}
 
83#include <stdio.h>
#include <conio.h>
void main ()
{
    double a,b,c;
    char op;
    printf ("请输入两个运算数,空格隔开\n");
    scanf ("%lf %lf",&a,&b);
    fflush(stdin);    //清空缓冲区m
    printf ("请输入运算符\n");
    scanf ("%c",&op);
    switch(op)
    {
        case '+':c=a+b;break;
        case '-':c=a-b;break;
        case '*':c=a*b;break;
        case '/':c=a/b;break;
    }
    printf ("计算结果为%lf\n",c);
}
84#include <stdio.h>
#include <conio.h>
void main ()
{
    double a,b,c;
    char op;
    printf ("请输入两个运算数,空格隔开\n");
    scanf ("%lf %lf",&a,&b);
    fflush(stdin);    //清空缓冲区m
    printf ("请输入运算符\n");
    scanf ("%c",&op);
    switch(op)
    {
        case '+':c=a+b;break;
        case '-':c=a-b;break;
        case '*':c=a*b;break;
        case '/':c=a/b;break;
    }
    printf ("计算结果为%lf\n",c);
}
 
85#include <stdio.h>
#include <conio.h>
void main ()
{
    double a,b,c;
    char op;
    printf ("请输入两个运算数,空格隔开\n");
    scanf ("%lf %lf",&a,&b);
    fflush(stdin);    //清空缓冲区m
    printf ("请输入运算符\n");
    scanf ("%c",&op);
    switch(op)
    {
        case '+':c=a+b;break;
        case '-':c=a-b;break;
        case '*':c=a*b;break;
        case '/':c=a/b;break;
    }
    printf ("计算结果为%lf\n",c);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值