49,757 Topics

Member Avatar for
Member Avatar for SylveeAshley

I am writing a program that calculates the volume of a cylinder when you input the diameter and height, using the formula 1/4*height*3.14*diameter^2 However the issue is, whenever I do that, the volume always comes out to be 0 when I run the program. #include<iostream> using namespace std; int main() …

Member Avatar for Husoski
1
187
Member Avatar for NotAceGG

#include<conio.h> #include<iostream> struct book int bookid; char title; float price; display(book); book input(); ; int main() book b1; b1=input(); display(b1); display(book b) std::cout<<"\n"<<b.bookid<<" "<<b.title<<" "<<b.price; book input(book b) book b; std::cout<<"Enter Bookid,Title,Price :"; std::cin>>b.bookid>>b.title>>b.price; return(b); error: 1st : error: 'input' was not declared in this scope 2nd : error: 'display' …

Member Avatar for rproffitt
0
38
Member Avatar for Fossi
Member Avatar for Maulana_1

#include<stdio.h> main() { int A[9]={6,3,1,5,7,4,2,8,9}; int Temp, I, J, K; printf("sebelum \n"); for(I=0; I<=9-1; I++) { printf(" %d ", A[I]); } for(K=0; K <= 9; K++) { J = K; for (I=K+1; I<=9-1; I++) { if (A[I] < A[J]) J = I; } Temp = A[J]; A[J] = A[K]; A[K] …

Member Avatar for rproffitt
0
89
Member Avatar for Billclinton

A company by the name focus computer system has a standard rate of 1.6% of the salary of every employee Write a c program that accept employee salary as to display the rate amount after it's application

Member Avatar for rproffitt
0
49
Member Avatar for Duki

Hey guys, here's the question I'm asked. **a.** *Define an enumeration type, triangleType, that has the values **scalene, isosceles, euilateral, and noTriangle**.* **b.** *Write a function, triangleShape, that takes as parameters three numbers, each of which represents the length of a side of the triangle. The function should return the …

Member Avatar for Dani
1
5K
Member Avatar for Ravi_76
Member Avatar for Kayra

#include <stdio.h> int main() ( float height, weight, bmi printf("Enter height in meter\n"); scanf("%f", &height); printf("Enter weight in kg\n"); scanf("%f", &weight); bmi = weight / (height * height); printf("Your BMI is %f\n", bmi); if(bmi < 15) ( printf("Your BMI category is: Starvation\n"); ) else if(bmi >= 15.1 && bmi <= …

Member Avatar for rproffitt
0
93
Member Avatar for Ismayil36

Hi everyone, When a file is deleted in the ufs file system, only the path to that file is deleted and the data of the file remains on disk. How can I find this data, this data will help me to recover the file. (As a reminder, I do this …

Member Avatar for rproffitt
0
16
Member Avatar for Haneen_1

Please can anybody help me? I'm a beginner . I need to write a c++ program that does the following : 1. Ask the user to enter two text file , the the first one contains a list of words in one column Regardless of their number , second one …

Member Avatar for rproffitt
0
89
Member Avatar for Simiyu
Member Avatar for fariraituge
Member Avatar for JackSterllING

The thing is to create a c++ program which recieve these coordinates x1,y1,x2,y2 in order to build an empty rectangle made of asterisks or whatever. I'm a beginner, so I need your help. Thanks.

Member Avatar for rproffitt
0
43
Member Avatar for Eu_531

Hi, I am a begginer and I can't find an useful full and free tutorial for using Open GL in game development... do anyone know a place to learn it? Also, an full C++ free tutorial would help me a lot!

Member Avatar for Naheedmir
0
77
Member Avatar for Shishir_1

Write a code in C++ that takes an undirected graph as input using adjacency list. Now apply BFS algorithm to find the farthest nodes from the source node. Take source node as input from user.

Member Avatar for rproffitt
0
25
Member Avatar for ComSciNum7

I'm having trouble with these functions made for a C++ hash table...any and all pointers in the right direction would be greatly appreciated! EDIT: table.h is the problem file, but I included node.h just in case! // FILE: table.h #ifndef TABLE_H #define TABLE_H #include <cstdlib> // Provides size_t #include <string> …

Member Avatar for tinstaafl
0
150
Member Avatar for Ali_698
Member Avatar for Prajkta_2

Create a code using python of random walk where food is placed in spots on the grid. Whenever a Walker runs into the food it eats it and reproduces

Member Avatar for rproffitt
0
150
Member Avatar for Rifki03
Member Avatar for Gabriela_4

Hello! I have a homework in which i should do this: **Input x+-3129 Output: 3x1+2-9=-4** I wrote this code and my output is : **3-1+2x9** Can somebody help me to find the problem and a way to calculate the expression in code? #include <iostream> #include<stack> using namespace std; bool isOperand(char …

Member Avatar for rproffitt
0
63
Member Avatar for agrbinoo.albaker

Write a C++ program that inputs a wavelength and then displays the associated light color. If the wavelength is shorter than 400 nm or longer than 700 nm, display the message “Wavelength outside visual range”. Classify boundary wavelengths as the lower-wavelength color. For example, label a wavelength of 424 nm …

Member Avatar for braian44
0
721
Member Avatar for Gabriela_4

Hello! So I have this homework that i have no idea how to continue. this is an exemple of input,but i have to do it for a general one: **7 pencils car ball candy tshirt bike video_game Mike Andrew Inna** and the output must be like this: **Mike: pencils candy …

Member Avatar for rproffitt
0
167
Member Avatar for Haneen_1

Hi..please can anybody help me..im beginner and i have a hard assignment i need to write a c++ program that do the follwoing : 1.aske the user to enter two text file the first one containe the text file ,the second one contain list of words in one column Regardless …

Member Avatar for rproffitt
0
50
Member Avatar for NinjaLink

"Write a program that reads in ten numbers to an array. The program then reads the array and displays distinct numbers (i.e. if a number appears multiple times, it is displayed only once)" for example: 1 2 3 4 [B]5 5 [/B]6 7 [B]8 8[/B] 9 1 2 3 4 …

Member Avatar for Nor_492
0
7K
Member Avatar for hamad_2

Q2. Write a method called countOdds in java that takes an array of 10 integers as a parameter which is given by the user. The method counts the odd numbers in the elements and return the count. please can someone help me with this its java programming

Member Avatar for rproffitt
0
35
Member Avatar for Muhamad_7

#include<iostream> using namespace std; int main() { string weekday; weekday= {"Mon","Tue","Wed", "Thu","Fri"}; cout<<"\n Please select day of booking:"; cin>>weekday; cout<<"\n Day of booking:"; return 0; }

Member Avatar for tinstaafl
0
32
Member Avatar for anes1

Implement in c++  Design an invoice class that has the following fields o Name, Item id , price, quantity  Support setter and getter for price and another attribute  2 constructor default one , and another one takes all the parameters  Provide 2 function o Get total …

Member Avatar for rproffitt
0
40
Member Avatar for c++help

i have a program that has one little glitch but i dont know how to fix it. If you can help it would be great. [b][code][/b] int main() { int a, b, c; b=0; c=0; do { cout << "Please enter a positive integer (negative integer to stop):"<< ' '; …

Member Avatar for vishakha_3
0
11K
Member Avatar for Muhammad_263

Write a program to sort elements of the array in this order. The even indexed elements should be in descending order and odd indexed elements must be in ascending order.

Member Avatar for Reverend Jim
0
58
Member Avatar for ferrerjulie

The End.