need some help

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Sep 2006
Posts: 16
Reputation: saqib is an unknown quantity at this point 
Solved Threads: 0
saqib saqib is offline Offline
Newbie Poster

need some help

 
0
  #1
Sep 28th, 2006
hello guys
i am new in this forum and in programing
i want to write a program which could convert given temperature and its unit into oher scales please give me some sugestions and ideas bout that
and i need to know how to declear chareters and how to take inputs of characters
Looking forward for yopur help
thanks
saqib.
Last edited by saqib; Sep 28th, 2006 at 10:45 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: need some help

 
0
  #2
Sep 28th, 2006
Originally Posted by saqib View Post
please give me some sugestions and ideas bout that and i need to know how to declear chareters and how to take inputs of characters
saqib.
How about buying a C/C++ book, or taking a C/C++ class or reading a C/C++ tutorial?
バルサミコ酢やっぱいらへんで
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 275
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: need some help

 
1
  #3
Sep 29th, 2006
With which part do you have problem? Formula for conversion or programming issue? For formulas, read this. For declaring char and inputting you got the answer from second post of this thread
Last edited by andor; Sep 29th, 2006 at 5:05 am.
If you want to win, you must not loose (Alan Ford)
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,642
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 471
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: need some help

 
1
  #4
Sep 29th, 2006
Yeah post your effort here and then maybe we would be able to help you out, just asking for code here would not fetch much help.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: need some help

 
1
  #5
Sep 29th, 2006
> i want to write a program which could convert given temperature and its unit into oher scales
Start with centigrade to centigrade.

Very trivial conversion, but it at least gets you to attempt the first part of actually attempting the "prompt the user and get answers" part of the program.

Then we at least will know which part of the problem you're really stuck on and we can advise accordingly.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 25
Reputation: hoosier23 is an unknown quantity at this point 
Solved Threads: 1
hoosier23 hoosier23 is offline Offline
Light Poster

Re: need some help

 
1
  #6
Sep 29th, 2006
Are you trying to write this program in C or C++? Have you tried to write the program yet? Show us what you have so far.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 38
Reputation: CurtisBridges is on a distinguished road 
Solved Threads: 1
CurtisBridges CurtisBridges is offline Offline
Light Poster

Re: need some help

 
1
  #7
Sep 29th, 2006
1: #include <iostream.h>2:3: float Convert(float);4: int main()5: {6: float TempFer;7: float TempCel;8:9: cout << "Please enter the temperature in Fahrenheit: ";10: cin >> TempFer;11: TempCel = Convert(TempFer);12: cout << "\nHere's the temperature in Celsius: ";13: cout << TempCel << endl;14: }15:16: float Convert(float Fer)17: {18: float Cel;19: Cel = ((Fer - 32) * 5) / 9;20: return Cel;21: }You should get the same
I don't know, maybe this will help
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 16
Reputation: saqib is an unknown quantity at this point 
Solved Threads: 0
saqib saqib is offline Offline
Newbie Poster

Re: need some help

 
0
  #8
Sep 29th, 2006
in two weeks of learning c. ihave wrote the following programs
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main(void)
{
int a_int,b_int,c_int,root1_int,root2_int;
printf("The Quadratic Equation\na*x*x+b*x+c=0\n");
printf("Value Of a_int\n");
scanf("%d",&a_int);
printf("Value Of b_int\n");
scanf("%d",&b_int);
printf("Value Of c_int");
scanf("%d",&c_int);
root1_int=(-b_int+sqrt(b_int*b_int-4*a_int*c_int))/(2*a_int);
printf("root1_int is%d\n",root1_int);
root2_int=-(b_int-sqrt(b_int*b_int-4*a_int*c_int))/(2*a_int);
printf("root2_int is%d\n",root2_int);
getche();
}
2
#include<stdio.h>
#include<conio.h>
void main(void)
{
int radius,volume,area;
printf("finding area and volume of a sphere);
printf("give the radius of sphere\n");
scanf("%d",&radius);
volume=(4/3)*3.14*radius*radius*radius;
printf("Volume Of Sphere is\n%d",volume);
area=4*3.14*radius*radius;
printf("\nArea Of Sphere is\n%d",area);
}
and some others
thanks for ur support now iam writing aprogramm which can find factorial but it is not working
#include<stdio.h>
void main(void)
{
int i,j,s,f,n;
printf("value of num");
scanf("%D",&n);
s=0;
{
for(i=1,i<=n,n++);
{
for(j=i,j>=1,j--);
}
s=i/f+s;
f=i;
}
printf("sum=%d"sum);
}
I am learning from book of Robert Lafore(Cprogramming Using Turbo C++)
Last edited by saqib; Sep 29th, 2006 at 8:58 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 16
Reputation: saqib is an unknown quantity at this point 
Solved Threads: 0
saqib saqib is offline Offline
Newbie Poster

Re: need some help

 
1
  #9
Sep 29th, 2006
the temperature program is runing now
#include<stdio.h>
#include<conio.h>
void main(void)
{
int kelvin,centigrade,fahrenheit;
printf("temperature in kelvin\n");
scanf("%d",&kelvin);
centigrade=kelvin-273;
printf("temperature in centigrade is\n%d,degree centigrades ",centigrade);
fahrenheit=(centigrade*9/5)+32;
printf("\ntemperature in fahrenheit is\n%d,degree fahrenheits ",fahrenheit);
getch();
}
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 275
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: need some help

 
1
  #10
Sep 30th, 2006
Use code tags and don't use void main (read this)
If you want to win, you must not loose (Alan Ford)
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC