Click here to Skip to main content
16,013,548 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to overlap a Edit control onto a List control? Pin
Naveen5-Apr-07 19:26
Naveen5-Apr-07 19:26 
AnswerRe: How to overlap a Edit control onto a List control? Pin
ThatsAlok23-Apr-07 0:05
ThatsAlok23-Apr-07 0:05 
QuestionSMS Text Messages Pin
Bram van Kampen5-Apr-07 13:58
Bram van Kampen5-Apr-07 13:58 
AnswerRe: SMS Text Messages Pin
ThatsAlok23-Apr-07 0:05
ThatsAlok23-Apr-07 0:05 
GeneralRe: SMS Text Messages Pin
Bram van Kampen4-May-07 14:33
Bram van Kampen4-May-07 14:33 
QuestionFunction help [modified] Pin
planetx225-Apr-07 12:47
planetx225-Apr-07 12:47 
AnswerRe: Function help Pin
Bram van Kampen5-Apr-07 14:59
Bram van Kampen5-Apr-07 14:59 
GeneralRe: Function help Pin
planetx225-Apr-07 15:16
planetx225-Apr-07 15:16 
Is this better? I kinda figured out how to use the function, but now I think thats where my problem lies. When i choose say 35 as the first value inputted, and then stop the loop, i dont get a correct celsius value but a number like 14.2323.2323. Here is my updated code, thanks.

[code]
// Computer Lab test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>

using namespace std;

// call this function to convert fahrenheit values into celsius (function name is CheckCent)
double CheckCent(double c)
{
if (c <= 30) return c;
c=c-32/1.8;
return c;
}

// main function
int _tmain(int argc, _TCHAR* argv[])
{
double myarray[51];
//double i;
int flag;
flag=1;
int i;
for(i = 0; i < 51 && flag == 1; i++)
{ // Loop to enter temperatures - pressing 1 continues, pressing 0 stops //
cout << "Enter Temperature Reading:";
cin >>myarray[i];
cout << "Enter 1 to input more values, 0 to stop";
cin >>flag;
}// End for
cout << "Number of elements in the array is: " << i;
cout <<"\n";

for(int j=0;j<=i;j++)
{
myarray[j]=CheckCent(myarray[j]);
cout << myarray[0];
}
return 0;
}





[/code]
GeneralRe: Function help Pin
Rick York5-Apr-07 15:27
mveRick York5-Apr-07 15:27 
GeneralRe: Function help Pin
Bram van Kampen5-Apr-07 15:39
Bram van Kampen5-Apr-07 15:39 
Questionfibbonacci series Pin
badamanil5-Apr-07 10:54
badamanil5-Apr-07 10:54 
AnswerRe: fibbonacci series Pin
led mike5-Apr-07 10:59
led mike5-Apr-07 10:59 
GeneralRe: fibbonacci series Pin
Mark Salsbery6-Apr-07 7:20
Mark Salsbery6-Apr-07 7:20 
AnswerRe: fibbonacci series Pin
Bram van Kampen5-Apr-07 14:45
Bram van Kampen5-Apr-07 14:45 
AnswerRe: fibbonacci series Pin
Ravi Bhavnani5-Apr-07 14:45
professionalRavi Bhavnani5-Apr-07 14:45 
AnswerRe: fibbonacci series Pin
Sathesh Sakthivel5-Apr-07 18:24
Sathesh Sakthivel5-Apr-07 18:24 
AnswerRe: fibbonacci series Pin
toxcct5-Apr-07 22:46
toxcct5-Apr-07 22:46 
AnswerRe: fibbonacci series Pin
cp98765-Apr-07 23:56
cp98765-Apr-07 23:56 
QuestionImage Display Pin
sunny.rana5-Apr-07 9:29
sunny.rana5-Apr-07 9:29 
AnswerRe: Image Display Pin
Mark Salsbery5-Apr-07 9:34
Mark Salsbery5-Apr-07 9:34 
QuestionHelp with MFC controls Pin
Dustin Henry5-Apr-07 9:20
Dustin Henry5-Apr-07 9:20 
AnswerRe: Help with MFC controls Pin
Maximilien5-Apr-07 9:27
Maximilien5-Apr-07 9:27 
AnswerRe: Help with MFC controls Pin
Mark Salsbery5-Apr-07 9:41
Mark Salsbery5-Apr-07 9:41 
GeneralRe: Help with MFC controls Pin
Dustin Henry5-Apr-07 10:32
Dustin Henry5-Apr-07 10:32 
AnswerRe: Help with MFC controls Pin
David Crow6-Apr-07 3:41
David Crow6-Apr-07 3:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.