Computer Science, asked by sumeelsyed1994, 4 months ago

Sub(22316) Practical no, 1:develop minimum 2 program using constant, variable, arithmetic expression, operators, exhibiting data type conversion, manual answer

Answers

Answered by shashikantmore150
5

Answer:

#include<iostream>

using namespace std;

int main(){

int a=12;

int b=12;

int c=a+b;

cout<<c;

return 0;

}

Answered by ishwaryam062001
0

Answer:

C Program for given Question.

Question : Sub(22316) Practical no, 1:develop minimum 2 program using constant, variable, arithmetic expression, operators, exhibiting data type conversion, manual answer

Explanation:

From the above question,

They have given :

1.develop minimum 2 program using constant, variable, arithmetic expression, operators, exhibiting data type conversion

C program:

Program 1

#include <stdio.h>

int main()

{

   const double PI = 3.14159; // Constant

   int radius; // Variable

   double area; // Variable

   printf("Enter radius of circle: "); // Output statement

   scanf("%d", &radius); // Input statement

   area = PI * radius * radius; // Arithmetic expression

   printf("Area of circle = %f", area); // Output statement

   return 0;

}

Program 2

#include <stdio.h>

int main()

{

   const int x = 5; // Constant

   int y = 10; // Variable

   int z = x + y; // Arithmetic expression

   printf("Value of z is: %d", z); // Output statement

   float a = (float) z; // Data type conversion

   printf("\nValue of a is: %f", a); // Output statement

   return 0;

}

For more such related questions : https://brainly.in/question/42312859

#SPJ2

Similar questions