Giter VIP home page Giter VIP logo

c-programs's Introduction

Problem solving through c language

Table of contents

No Questions
Input & Output System
1 Make Lower case to Capital
2 Make Capital case to Lower
3 Convert Decimal to Hexa Decimal
4 Sum 2 numbers from inputs
5 Average number from inputs
6 Area of a triangle by height & weight
7 Length of 3 sides of triangle
8 Area of rectangle
9 Radius of the circle
10 Fahrenheit to Celsius
11 Celsius to Fahrenheit
  1. Make lower case to capital

    char makeCapital;
    
    printf("Write a lower case character : ");
    scanf("%c",&makeCapital);
    
    printf("Your conversion is : %c",makeCapital - 32;
  1. Make Capital case to Lower

    char makeLower;
    
    printf("Write a Capital character : ");
    scanf("%c",&makeLower);
    
    printf("Your conversion is : %c",makeLower + 32);
  1. Decimal to Hexa Decimal

    int number;
    printf("Write an integer number : ");
    scanf("%d",&number);

    printf("Hexadecimal Number : %x",number);
  1. Sum 2 Numbers from inputs

    in this section i am going to take 2 different numbers for make addition ans show the result in console.

    int num1,num2,sum;
    
    printf("Write two numbers : ");
    scanf("%d %d",&num1,&num2);

    sum = num1 + num2;
    printf("Two number sum is : %d",sum);

  1. Average Number from inputs

    int num1,num2,result;
    float evg;
    
    printf("Write two numbers :");
    scanf("%d %d",&num1,&num2);

    result = num1 + num2 ;
    printf("Sum is : %d", result);

    evg = (float)result / 2 ;
    printf("average is : %.1f",evg);
  1. Area Of A Triangle from inputs

    float height , base , area;
    
    printf("What is your height : ");
    scanf("%f",&height);
    
    printf("What is your width : ");
    scanf("%f",&base);
    
    area = (float)1/2 * height * base;
    printf("Result is : %.2f",area);
  1. Length of 3 sides of a triangle

    double a , b , c, s , area;
    
    printf("Enter 3 Values : ");
    scanf("%lf %lf %lf",&a,&b,&c);

    s = (a+b+c)/2;
    area = sqrt(s*(s-a)*(s-b)*(s-c));

    printf("The Area of Triangle : %.2lf",area);
  1. Area of Rectangle

    float length,width,area;

    printf("Enter your length : ");
    scanf("%f",&length);

    printf("Enter your width : ");
    scanf("%f",&width);

    area = length * width;

    printf("The area of rectangle : %.2f",area);
    
  1. Radius of the circle

    float area , radius;
    printf("Write your radius : ");
    scanf("%f",&radius);

    area = 3.1416 * radius * radius;

    printf("Area of Circle : %.2f",area);
  1. Fahrenheit to Celsius


float c , f ;
printf("Write your centegrate value : ");
scanf("%f",&c);

f = (1.8 * c)+ 32;

printf("Fahrenheit : %.2f \n",f);

  1. Celsius to Fahrenheit

// Rules : c = (f-32)/1.8;

float c , f;

printf("Write your fahrenheit value : "); scanf("%f",&f);

c = (f-32)/1.8;

printf("Celcius value is : %.2f",c);

c-programs's People

Contributors

ashikurrohman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.