Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,191 members, 7,811,495 topics. Date: Sunday, 28 April 2024 at 01:05 PM

Pls Some Hel[ Me With This C++ - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Pls Some Hel[ Me With This C++ (1094 Views)

Help! Im Stuck With This C# Program / Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! / Programmer Should Please Help Me To Solve This C++ Questions (2) (3) (4)

(1) (Reply) (Go Down)

Pls Some Hel[ Me With This C++ by Nobody: 1:00pm On Sep 09, 2010
i am presently studying C++ on my own and came across a problem . where i was asked to convert degree Celsius to Fahrenheit pls can anyone help me out with the algorithm
Re: Pls Some Hel[ Me With This C++ by Nobody: 10:44pm On Sep 09, 2010
omo you for try google sha.
Re: Pls Some Hel[ Me With This C++ by mikkytrio(m): 1:32am On Sep 10, 2010
Program Problem: Convert Degree celcius to degree fahrenheit.

algorithm:
- Variables (all doubles), userCelcius, resultFarenheit.
- Prompt user for celcius value, store celcius value in variable userCelcius.
- resultFarenheit = ( (9 / 5) x userCelcius) + 32.
- /final step display result in any form you want ie on a console window or save it ina file.
Re: Pls Some Hel[ Me With This C++ by okeyxyz(m): 1:01am On Sep 12, 2010
mikkytrio is correct. thats d progrm in plain words. simple enof. just rewrite them in codes.
cheers.
Re: Pls Some Hel[ Me With This C++ by Nobody: 7:22pm On Sep 12, 2010
hey mikkytrio thks will go and write the code and get back to you
Re: Pls Some Hel[ Me With This C++ by Mobinga: 8:45pm On Sep 12, 2010
its on my system  grin
Re: Pls Some Hel[ Me With This C++ by mj(m): 5:02pm On Sep 14, 2010
should i write the program for you with java, vb.net, c sharp, or php ? i dont write programs with C++.
Re: Pls Some Hel[ Me With This C++ by Nobody: 5:17pm On Sep 14, 2010
^^ It's good for every developer to learn their programming in C++ FIRST (not even C).
this provides a firm foundation for any other language that they can then enter into later.

Java , .NET and what not makes things too easy and takes care of things for you that really you should be allowed to deal with at least during your learning periods so you have a stronger foundation.
e.g I program in all of them (been coding since I was 12), and java and .NET doesn't instill in the coder the need to "deallocate" objects they create.

If you were to then code now for something like the iPhone that doesn't use a managed framework (Objective C, iyama lipsrsealed), you'll be in for a hard time as you're just gonna be crashing and having memory leaks all over the place.
Re: Pls Some Hel[ Me With This C++ by Nobody: 7:05pm On Sep 15, 2010
2buff:

^^ It's good for every developer to learn their programming in C++ FIRST (not even C).
this provides a firm foundation for any other language that they can then enter into later.

Java , .NET and what not makes things too easy and takes care of things for you that really you should be allowed to deal with at least during your learning periods so you have a stronger foundation.
e.g I program in all of them (been coding since I was 12), and java and .NET doesn't instill in the coder the need to "deallocate" objects they create.

If you were to then code now for something like the iPhone that doesn't use a managed framework (Objective C, iyama lipsrsealed), you'll be in for a hard time as you're just gonna be crashing and having memory leaks all over the place.
thanks am learning c++ as my foundation programming language, it ain't easy for me now ohh, using forums and e -books to learn .Hope to learn java ,python, and php later .




here is my code pls gurus check it for me if it works cos i don't have a compiler now my network here is so slow trying to download seems impossible
#include<iostream.h>
   float convert (float)
   int main()
{
   

     float Tempfer;
     float tempcel;
     
count<<"please enter the temp in fahrenhiet";
   
cin>>Tempfer;
   
Temp cel=convert(Tempfer);

cout<<" In here's is the temperature in celcius";

cout<<Tempcel<<endl;

return 0;
}

float convert (float tempfer);
{
float Tempcel;

Tempcel=((tempfer-32)*5)/9

return tempcel;
}

pls i need correction if am wrong and possible help me out with the codes,
thks love you all,
Re: Pls Some Hel[ Me With This C++ by okeyxyz(m): 12:34am On Sep 16, 2010
i'll take it line by line, assuming "#include <iostream.h>" is line 0:

on line 2, finish with a semicolon (wink

c++ is case sensitive, u must be consistent with your namings. use "Tempcel"(or tempcel)
throughout the code. applies also to "Tempfer"(or tempfer).

on line 6, "cout<<", not "count<<". (this is just typo error, not dat u don't know it)

on line 8, "Tempcel", not "Temp cel" (another typo)

on line 13, remove semicolon at the end. (u can't use semicolon on the function during implementation, only when declaring function. like u shuld have done on line 1)

on line 16, finish with a semicolon (after 9)

other than these, your code is ok.

Do try ur best to get a compiler. it impossible to grasp c++ without compiler, because it goes beyond just the theory. maybe somebody in the forum can get you one, if you can't download. try computer village if u are in lagos. cheers.
Re: Pls Some Hel[ Me With This C++ by Nobody: 8:13pm On Sep 16, 2010
okeyxyz:

i'll take it line by line, assuming "#include <iostream.h>" is line 0:

on line 2, finish with a semicolon (wink

c++ is case sensitive, u must be consistent with your namings. use "Tempcel"(or tempcel)
throughout the code. applies also to "Tempfer"(or tempfer).

on line 6, "cout<<", not "count<<". (this is just typo error, not dat u don't know it)

on line 8, "Tempcel", not "Temp cel" (another typo)

on line 13, remove semicolon at the end. (u can't use semicolon on the function during implementation, only when declaring function. like u shuld have done on line 1)

on line 16, finish with a semicolon (after 9)

other than these, your code is ok.

Do try your best to get a compiler. it impossible to grasp c++ without compiler, because it goes beyond just the theory. maybe somebody in the forum can get you one, if you can't download. try computer village if u are in lagos. cheers.
thks i was able to lay my hands on devc++ compiler and i tried compiling but it couldn't compile after following your correction.pls help me
Re: Pls Some Hel[ Me With This C++ by okeyxyz(m): 9:33pm On Sep 16, 2010
i'd just copied ur code & made d corrections myself & d following is d result. i'd not added anything to try make it better, just ur exact code with corrections as i directed. i'd compiled it & it works. i used borland C++ compiler. try it on urs & let me know. cheers.


#include<iostream.h>
float convert (float);
int main()
{
float Tempfer;
float Tempcel;
cout<<"please enter the temp in fahrenhiet";
cin>>Tempfer;
Tempcel=convert(Tempfer);
cout<<" In here's is the temperature in celcius";
cout<<Tempcel<<endl;
return 0;
}

float convert (float Tempfer)
{
float Tempcel;
Tempcel=((Tempfer-32)*5)/9;
return Tempcel;
}
Re: Pls Some Hel[ Me With This C++ by mazee: 4:50pm On Jun 25, 2011
okeyxyz:

i'd just copied your code & made d corrections myself & d following is d result. i'd not added anything to try make it better, just your exact code with corrections as i directed. i'd compiled it & it works. i used borland C++ compiler. try it on urs & let me know. cheers.


#include<iostream.h>
   float convert (float);
   int main()
{
float Tempfer;
float Tempcel;
   cout<<"please enter the temp in fahrenhiet";
   cin>>Tempfer;
   Tempcel=convert(Tempfer);
   cout<<" In here's is the temperature in celcius";
   cout<<Tempcel<<endl;
   return 0;
}

float convert (float Tempfer)
{
   float Tempcel;
   Tempcel=((Tempfer-32)*5)/9;
   return Tempcel;
}


#include<iostream.h> should be #include<iostream>

#include<iostream.h> is used in C

without the .h

#include<iostream> is used in C++

(1) (Reply)

Gurus In D House,help Me On Ds Netbeans/oracle 10g Xe Db / Nigeria Based Incubator & Seed Fund. / Python Exercise

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.