DesolateCarnage.net
Members
|
Search
Hey Guest
Options Menu
DC Forums
→
General Archive - 2009
→ @ Task
@ Task
Archived | Views: 986 | Replies: 18 | Started 15 years, 3 months ago
#572035 |
Wed - Jul 15 2009 - 11:26:44
boblong11
Group: Guest
Posts: 5,799
Joined: May 26 2008
Contact:
Offline
PM
Points
:
109.60
Need to figure out how to make this a for loop not a while loop PLIZ.
CODE
#include <iostream>
#include <cstdlib>
using namespace std;
void Greeting (double);
int main() {
//Declerations
double repeat;
//Input
cout << "Enter the numbers of times to say Hello: ";
cin >> repeat;
Greeting(repeat);
system("PAUSE");
return 0;
}
//Process
void Greeting (double repeat) {
while (repeat > 0) {
cout << "Hello" << endl;
repeat = repeat - 1;
}
}
#572037 |
Wed - Jul 15 2009 - 11:28:30
M_A_T_T
Group: Guest
Posts: 12,455
Joined: Mar 24 2008
Contact:
Offline
PM
Points
:
4,371.10
7
#572049 |
Wed - Jul 15 2009 - 12:12:56
blind_chief
Group: Members
Posts: 74,198
Joined: Oct 25 2006
Contact:
Offline
PM
Points
:
6,883.75
m9
#572056 |
Wed - Jul 15 2009 - 12:19:51
hedonism
Group: Members
Posts: 22,704
Joined: Oct 22 2006
Contact:
Offline
PM
Points
:
1,044.55
#572060 |
Wed - Jul 15 2009 - 12:27:50
xstakemx
Group: Members
Posts: 50,465
Joined: Mar 29 2008
Contact:
Offline
PM
Points
:
9,628.10
I don't understand why you made this toilet, I thought you downloaded the ilolphone app: "help me during my java test task."
#572061 |
Wed - Jul 15 2009 - 12:28:32
xstakemx
Group: Members
Posts: 50,465
Joined: Mar 29 2008
Contact:
Offline
PM
Points
:
9,628.10
Quote (xstakemx @ Wed - Jul 15 2009 - 13:27:50)
I don't understand why you made this toilet, I thought you downloaded the ilolphone app: "help me during my java test task."
Hey Asshole!!! Java isn't the same as JavaScript.
#572062 |
Wed - Jul 15 2009 - 12:29:41
xstakemx
Group: Members
Posts: 50,465
Joined: Mar 29 2008
Contact:
Offline
PM
Points
:
9,628.10
Quote (xstakemx @ Wed - Jul 15 2009 - 13:28:32)
Quote (xstakemx @ Wed - Jul 15 2009 - 13:27:50)
I don't understand why you made this toilet, I thought you downloaded the ilolphone app: "help me during my java test task."
Hey Asshole!!! Java isn't the same as JavaScript.
Guys just made cuz the languages he knows how to program in are less valid and useful than
's reproductive organs
#572063 |
Wed - Jul 15 2009 - 12:30:28
smoked
Group: Members
Posts: 47,603
Joined: Sep 1 2006
Contact:
Offline
PM
Points
:
44,538.17
Quote (xstakemx @ Wed - Jul 15 2009 - 13:28:32)
Quote (xstakemx @ Wed - Jul 15 2009 - 13:27:50)
I don't understand why you made this toilet, I thought you downloaded the ilolphone app: "help me during my java test task."
Hey Asshole!!! Java isn't the same as JavaScript.
This one? LOL
#572086 |
Wed - Jul 15 2009 - 14:59:36
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
just use an if statement inside a loop?
#572087 |
Wed - Jul 15 2009 - 15:01:57
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
loop
if repeat greater than 0
cout
repeat = repeat--
else exit
#572095 |
Wed - Jul 15 2009 - 15:30:40
___
Group: Members
Posts: 26,993
Joined: Aug 30 2006
Contact:
Offline
PM
Points
:
1,959.57
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
while (1)
{
printf("desu ");
}
return EXIT_SUCCESS;
}
#572216 |
Wed - Jul 15 2009 - 20:55:56
boblong11
Group: Guest
Posts: 5,799
Joined: May 26 2008
Contact:
Offline
PM
Points
:
109.60
nvm figures it out
#572226 |
Wed - Jul 15 2009 - 21:31:24
boblong11
Group: Guest
Posts: 5,799
Joined: May 26 2008
Contact:
Offline
PM
Points
:
109.60
Which of the following statements creates an object of the ifstream class?
1. ifstream results:
2. fstream ifstream results;
3. define results as ifstream;
4. results = ifstream;
#572227 |
Wed - Jul 15 2009 - 21:37:59
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
if you typo'd number 1 to be a : instead of ;, then its number 1
ifstream results;
#572228 |
Wed - Jul 15 2009 - 21:38:14
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
also, ifstreams are humongous pains in the ass, at least they were for me
#572231 |
Wed - Jul 15 2009 - 21:42:04
boblong11
Group: Guest
Posts: 5,799
Joined: May 26 2008
Contact:
Offline
PM
Points
:
109.60
it's a quizz
and it has a : on it
donno if type donno if its not
#572233 |
Wed - Jul 15 2009 - 21:42:41
boblong11
Group: Guest
Posts: 5,799
Joined: May 26 2008
Contact:
Offline
PM
Points
:
109.60
all the other answers seem weird so i might just go with number 1
#572235 |
Wed - Jul 15 2009 - 21:54:57
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
well i really dotn know the answer then
i know they were defined some weird way, but dunno
#572236 |
Wed - Jul 15 2009 - 21:55:02
randomtask
Group: Members
Posts: 74,769
Joined: Aug 5 2007
Contact:
Offline
PM
Points
:
7,730.25
try googling
Archived | Views: 986 | Replies: 18 |
General Archive - 2009 Topic List
Quit the Internet
DC Forums powered by
___
and
3rror.org
© 2006-2015