char makeCapital;
printf("Write a lower case character : ");
scanf("%c",&makeCapital);
printf("Your conversion is : %c",makeCapital - 32;
char makeLower;
printf("Write a Capital character : ");
scanf("%c",&makeLower);
printf("Your conversion is : %c",makeLower + 32);
int number;
printf("Write an integer number : ");
scanf("%d",&number);
printf("Hexadecimal Number : %x",number);
- 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);
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);
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);
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);
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);
float area , radius;
printf("Write your radius : ");
scanf("%f",&radius);
area = 3.1416 * radius * radius;
printf("Area of Circle : %.2f",area);
float c , f ;
printf("Write your centegrate value : ");
scanf("%f",&c);
f = (1.8 * c)+ 32;
printf("Fahrenheit : %.2f \n",f);
// 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);