Q NO 4
#include <stdio.h>
#include <conio.h>
void main()
{
float r,c;
clrscr();
printf("Enter the value of radius\t");
scanf("%f",&r);
c=2*3.14*r;
printf("Circumference of circle is %f",c);
getch();
getch();
}
Q No 3
#include <stdio.h>
#include <conio.h>
void main()
{
flot a,b,c;
flot s;
clrscr();
printf ("Enter the value of fist integer\t");
scanf("%f",&a);
printf ("Enter the value of second integer\t");
scanf("%f",&b);
printf ("Enter the value of third integer\t");
scanf("%f",&c);
s=(a*a*a)+(b*b*b)*c/4;
printf("The calculation of the formula is %f",s);
getcg();
}
Q No 2
Q No 2 & Q No 3 are same
Q No 2 & Q No 3 are same
Only formula you will write in this way.
D=sqrt((a-b)*(a+b))/2;
On Tue, Sep 27, 2011 at 3:01 PM, Sadia Aslam <bc100400590@vu.edu.pk> wrote:
hello sir i can give you last two programs
On Tue, Sep 27, 2011 at 1:57 PM, · ··^v´¯`×) shafique ahmed kayani® (×´¯`v^·· · <bc100201687@vu.edu.pk> wrote:
need help in C programing assignment.
1-
Write a prog which take user subject marks from the user and calculate the obtained marks i.e sum of all subjects and percentage by using formula
percentage = obtained marks/400 * 100.
display all subjects marks, marks obtained and percentage on screen.
2-
write a prog which take a and b from user using type float and calculate the formula
D= (a-b)(square on bracket) (a+b)(square on bracket) / 2
Display the results on screen
3-
Write a prog which take 3 integers from user and calculate the following formula
s = a(cube)+b(cube) * C / 4
4-
write a prog which take radius of a circle from the user and calculate the circumfrence of circle by formula
circumference = 2 (payi) r
where pie = 3.14
--
Join us at facebook: https://www.facebook.com/VU.Study.Corner
Group Link: http://groups.google.com/group/VU-Study-Corner?hl=en
Group Rules: http://groups.google.com/group/VU-Study-Corner/web/group-rules
Unsubscribe: VU-Study-Corner+unsubscribe@googlegroups.com
Adult contents, Spamming, Immoral & Rudish talk, Cell number, Websites & Groups links specially in paper days are strictly prohibited and banned in group.
--
Join us at facebook: https://www.facebook.com/VU.Study.Corner
Group Link: http://groups.google.com/group/VU-Study-Corner?hl=en
Group Rules: http://groups.google.com/group/VU-Study-Corner/web/group-rules
Unsubscribe: VU-Study-Corner+unsubscribe@googlegroups.com
Adult contents, Spamming, Immoral & Rudish talk, Cell number, Websites & Groups links specially in paper days are strictly prohibited and banned in group.
No comments:
Post a Comment