13 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Krazykado

I am fairly new to Java programming and I am having problems with creating a program with these requirements: 1. Create a program to simulate the roll of 2 – six sided dice. 2. Test to see if the dice are equal. 3a. If they are equal print “You win! …

Member Avatar for matencio
0
779
Member Avatar for nidajaffri

Write a program in C/C++/Linux to find the mean and then use that mean for further calculations. Make three threads to perform different task as follows: a) The 1st Thread will find the mean. b) The 2nd Thread will take the mean from the 1st Thread and display the numbers …

Member Avatar for nidajaffri
-1
2K
Member Avatar for annitaz

My code for the calculator is: calculator.h [CODE]#ifndef CALCULATOR_H #define CALCULATOR_H #include <QWidget> #include <QGridLayout> #include <QLineEdit> #include <QLabel> #include <QPushButton> #include <QLCDNumber> #include <QString> #include <QMessageBox> #include <QErrorMessage> class Calculator : public QWidget { Q_OBJECT public: //constructor Calculator(); public slots: //function to add the two numbers that the user …

Member Avatar for imolorhe
-1
358
Member Avatar for ineedsomehelp:3

[CODE]void printer(char x) { int d, b, z; for(z=x; z>=1; z--) { for(b=z; b<=x-1; b++) printf(" "); for(d=z; d>=1; d--) printf("%d ", d); printf("\n"); } }[/CODE] that's my code which is supposed to print 4 3 2 1 4 3 2 4 3 4 when input is 4. however, it …

Member Avatar for Arbus
0
212
Member Avatar for syria718

[CODE]char main()/*Start of the function main???*/ { char choice1; char choices = 'y'; while(choices == 'y' && choices != 'n'){/*while loop initialization*/ print(); getchar(); scanf("%c",&choice1); printf("%c",choice1); switch(choice1){/*Switch case statement,,,*/ case 'a': case 'A': addContact(); break; case 'f': case 'F': search(contacts); break; case 'v': case 'V': list(); break; case 'e': case …

Member Avatar for Narue
0
272
Member Avatar for syria718

please help me fix these problem,,,, when i'm running the program it exits emediately [CODE]main()/*Start of the function main???*/ { do{/*do while loop initialization*/ print(); scanf("%c",&choice1); switch(choice1){ case 'A': case 'a': addContact(); break; case 'F': case 'f': search(contacts); break; case 'v': case 'V': list(); break; case 'e': case 'E': edit(contacts); …

Member Avatar for syria718
0
146
Member Avatar for Valiantangel

Hi can someone help in in understanding the following code esp the "?".I cant understand how the output 9:10:5 as obtained. Thank You. The code is as followed: [CODE]#include <iostream> using namespace std; int main() { short hour =9, minute =10, second =5; cout << (hour <10 ? "0":"" )<<hour<<":" …

Member Avatar for Narue
0
164
Member Avatar for gujinni

[code]#include <iostream> #include <cassert>//what is the use of this??? #include <algorithm>//how to convert in turbo c++ and what is the use this??? #include <vector>//is this array in turbo c++??? using namespace std; int main() { bool result;// what is the use of this?? string s("abcde"); string s2("aeiou"); vector<char> vector1(s.begin(), s.end());// …

Member Avatar for gujinni
0
371
Member Avatar for sharathg.satya

can any one help me in solving a question posted by friend..... i tried to google but i didnt find the accurate answer for my question.. i wish to 'print 1 to n' without using loops and recursion help me please.. thanks in advance

Member Avatar for bajishareef
0
269
Member Avatar for kneel

[code] #include <iostream> #include <list> #include <numeric> #include <algorithm> using namespace std; int main() { // create linked list of integers list<int> the_list; // input as requested cout << " Enter length of the list " << endl; size_t len; cin >> len; for(size_t i=0; i<len; ++i) { cout << …

Member Avatar for kneel
0
157
Member Avatar for aimee_jc

[CODE]function projection($x1, $x2, $x3){ //$x1 = first year //$x2 = second year //$x3 = last year if (($x1 != "") ||($x1 != 0) && ($x2 != "") ||($x2 != 0) && ($x3 != "") ||($x3 != 0)){ //MODIFIED EXPONENTIAL $b = ($x3-$x2)/($x2 - $x1); $a = ($x3 - $x2) / …

Member Avatar for jwenting
-3
83
Member Avatar for aimee_jc

[CODE]$k2 = $subject_k2/40; $j2 = $subject_k2%40; if($j2 >= 15){ $k2 = $k2 + 1; }[/CODE] what is the time complexity of the above code? thank u!

Member Avatar for jwenting
-2
55
Member Avatar for xsach

i need to find all the files in the directory and sub directory that have a text file..within this text file there is a string called average with some value.. the code below works fine for a single directory...but i need to find the same text files in the sub …

Member Avatar for xsach
0
107

The End.