1.
#include <stdio.h>
#include<math.h>
int main ()
{
double x=2.55;
double result;
result=
3*pow(x,3)- 5* pow(x,2)+6;
printf
("The result of the polyominal for x= 2.55 is: %1f\n", result);
return 0;
}
#include<stdio.h>
int main()
{
int
x, y, next_multiple;
printf("Enter the value of
x:");
scanf("%d", &x);
printf("Enter the value of
y:");
scanf("%d", &y);
next_multiple= x+y - x%y;
printf("Next_multiple =
%d",next_multiple);
return 0;
}
#define PI 3.1415
int main ()
{
float volume,
radius;
printf("Enter
the radius : ");
scanf("%f", &radius);
volume = ( 1.33 *
PI * radius * radius * radius);
printf("Volume
: %f \n", volume);
return 0;
}
int main()
{
float final_result, mid_term_marks,
final_exam_marks;
printf("enter
your mid_term_marks(out of 30):");
scanf("%f",
&mid_term_marks);
printf("Enter
your final exam marks(out of 100):");
scanf("%f",
&final_exam_marks);
final_result = mid_term_marks
+ 0.7*final_exam_marks;
printf("Your
final result is:%.2f\n",final_result);
return 0;
}
0 Comments
Post a Comment