15,539 Topics

Member Avatar for
Member Avatar for Валенти

Hello! I’m first year at the university and I’m studying programming. I studying C++. I need to do the Minesweeper game but I don't know how to write the code and what it means. I need someone who can write the program and explain it to me.

Member Avatar for rproffitt
0
63
Member Avatar for いわしろ

#include<stdio.h> #includ<conio.h> Int main() { int ch; float F,C,R,K; char chs; printf(“Choose Input Value\n1.F\n2.C\n3.R\n4.K\n”); scanf(“%d”,&ch); switch(ch) { Case1: F=input(“Fahrenheit value”); C=(5/9)*(F-32); K=C+273.15; R(9/5)*K; Case2: C=input(“Celsius value”); F=(9/5)*(F-32); K=C+273.15; R=(9/5)*K; Case3: R=input(“Rankine value”); F=R-459.67; C=(5/9)*(F-32); K=C+273.15; Case4: K=input(“Kelvin value”); R=(9/5)*K; F=R-459.67; C=(5/9)*(F-32); default: printf(“Invalid Input”) } fflush(stdin); printf(“Print final value F=%0.3f …

Member Avatar for rproffitt
0
63
Member Avatar for asdfg_8

You are provided with a text file containing randomized integers from 1-10000 called randomNum.txt. Write a program to sort these integers. You will have to create 5 separate processes for this, which will work in parallel to sort the integers. This means Process 1 will sort integers from 1-2000. Process …

Member Avatar for rproffitt
0
27
Member Avatar for TimTheCoder

Hello guys, am trying to access the windows in-built adapter from C# library known as Bluetooth LE (Low Energy). I have installed the nuget package and when I try to run my code, I get the error that **Unhandled exception. System.ArgumentException: [Plugin.BluetoothLE] No platform plugin found. Did you install the …

Member Avatar for rproffitt
0
130
Member Avatar for zimbayla

Hello, I am new in C programming, I am writing a function to evaluate a prefix arithmetic expression. I know my code works well but it seems the message floating exception (core dumped) is because if my (preval / 0) the program is not going to work. However, I would …

Member Avatar for rproffitt
0
89
Member Avatar for Jeph_1

Hello, I wrote this c program that will rearrange the numbers in an array such that all the even numbers come first and that will also calculate the sum. However, when I tested it on mipsmark software ( for correcting assembly language programs) I have a test fails. Here's what …

Member Avatar for Jeph_1
0
79
Member Avatar for Jeph_1

Hello, I am trying to count the number of characters in a string $a0 that return a 1 when passed to the function, otherwise return 0. Heres what I did: I dont have the correct answer __ output format must be 3, I have 11 .text .globl __start __start: # …

Member Avatar for rproffitt
0
134
Member Avatar for Mriel

Do you think that the structured programming is still useful now on day (for developing)?

Member Avatar for Schol-R-LEA
0
61
Member Avatar for COKEDUDE

I was looking at this struct tutorial. https://www.tutorialspoint.com/cprogramming/c_structures.htm It mentions "The structure tag is optional". How would you refer to your struct if there is no structure tag? struct { char title[50]; char author[50]; char subject[100]; int book_id; }; //something like this? struct random_name;

Member Avatar for Schol-R-LEA
0
64
Member Avatar for Abeiyh

Create a program that displays the result of a sales transaction. The calculation requires three numbers. The first number represents the product price. The second number is the salesperson commission. These two numbers should be added together. The third value represents a customer discount; subtract this third from the result …

Member Avatar for Dani
0
52
Member Avatar for Prakriti_2

It will be an interactive system where model restaurant will take order from its customer and generate bill. System will also generate daily menu list based on the sales of veg and non-veg items during last 15 days. I am unable to figure out second part of generating daily menu. …

0
32
Member Avatar for tethered_cable

I’m trying to scan in a txt file with a string of numbers. t.txt 123 223 323 <#include stdlib.c> <#include stdio.c> <#include string.h> int main{ char grid[3][3]; int i = 0; File *f = fopen(“t.txt”, “r”) while (i != 3){ for (int j = 0; j < 3; j++){ fscanf(f, …

Member Avatar for rproffitt
0
44
Member Avatar for tethered_cable

I’m trying to scan in a txt file with a string of numbers. t.txt 123 223 323 File *f = fopen(“t.txt”, “r”) while (i != 3){ for (int j = 0; j < 3; j++){ fscanf(f, “%1c”, &grid[i][j]); } i++; } But it prints a segment fault.

Member Avatar for rproffitt
0
26
Member Avatar for tethered_cable

I’ve been trying to use the fscanf function to read a txt file containing a single number into a ptr: (file.txt) 1 File *fPtr=fopen(“file.txt”, “r”) int r; fscanf(fPtr, “%d”, &r); I keep getting a segmentation fault, after running it though the program compiles. It happens pretty much any other way …

Member Avatar for rproffitt
0
28
Member Avatar for مبشر

//Basic libraries #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> #include <stdbool.h> #include <time.h> #define Empty 0 #define P1 1 #define P2 2 #define Height 6 #define Width 7 int board[Height][Width]; char gamestr[41]; void show_game_list(){ //Open game file for reading FILE * fp; char * line = NULL; size_t len …

Member Avatar for Fifth Horseman
0
93
Member Avatar for tixtqs

Hey, so I'm still very new at programming/coding and for fun, I wanna make some sort of script. For a offline fighting game. So let's say I press one key, it does one combo? does that make any sense? I just wouldn't know how to go about that is there …

Member Avatar for ivy.inc.Hugh
0
88
Member Avatar for complete

How do I set a system-wide _ifdef? This is using Microsoft Visual Stuedio version 2019 with C#. If I want to add specialized code to a project shared by multiple software developers that is designed for my selfish tests and evaluation, how do I manage a # definition inside the …

Member Avatar for rproffitt
0
46
Member Avatar for darelin

Type the next higher prime following the number entered in the console. in c#

Member Avatar for rproffitt
0
55
Member Avatar for Crona

I have a homework assignment that im not really sure how to approach as of right now, I've done some research but. I have not found really anything that would pertain to what I'm doing. Any help would be appreciated <3 . So far this is what I have: /****************************************************************************** …

Member Avatar for DGPickett
0
235
Member Avatar for Ahad_1

Hello! I'm working on this linked list project where I'm supposed to save the employee data in a linked list and apply some operations. and I am new with c++ so I'll show you my code and please help me with it. my questions are: 1- whenever I enter a …

Member Avatar for toneewa
0
130
Member Avatar for Matthew_36

Hello all, I've searched a lot and found a bunch of answers and edited my comparison many many times, but just cannot get a sorted output. Here is my struct typedef struct sortedDistance { int storeID; int zipCode; double latitude; double longitude; double distance; char address[50]; char city[50]; char state[20]; …

Member Avatar for vmanes
0
765
Member Avatar for Nathan_22

C++ program that displays on the screen item codes with corresponding item descriptions and prices. It asks the user to enter the code of the item purchased by a customer. It looks for a match of the item code stored in items.txt. How to read a specific line from a …

Member Avatar for toneewa
0
740
Member Avatar for Ved_683

I have to write a c program for finding the impedance of RLC circuit and represent the result in both polar and rectangular coordinate system

Member Avatar for Reverend Jim
0
105
Member Avatar for Natalii_13

Dog leaves his lamppost on summer evenings and staggers randomly either two steps in the direction toward home or one step in the opposite direction. After taking these steps, the dog again staggers randomly two steps toward home or one step backward and does this again and again. If the …

Member Avatar for rproffitt
0
120
Member Avatar for bandanasc

I am trying to edit a file that contains: Time Column 1 Column 2 Column 3. I need to print Column 2 after column 1. Time Column 1 Column 2

Member Avatar for Schol-R-LEA
0
74
Member Avatar for COKEDUDE

How would you describe c programming to a person that does not know anything about computers?

Member Avatar for rproffitt
0
181
Member Avatar for Gonzalo_3

Hello. I want to start studying the Golang language but I can't find any IDE that I can configure well, can you tell me an IDE that is good for Go and how to configure it (explained for fools in Spanish), please? I have tried with Sublime, Visual Studio Code …

Member Avatar for rproffitt
0
58
Member Avatar for bj76407

Hey guys and gals, any ideas on gaming laptops with good cooling system. Mine just melted ... :/

Member Avatar for redapplelearn
1
392
Member Avatar for Kepler123

#include <stdio.h> #include <math.h> int main() float i, x; double fact=0, sum=0; printf("Enter value of x as the power of e: "); scanf("%f", &x); printf("Enter n as the number of terms: "); scanf("%d",&i); for (i = 0; i < 99999; i++) { sum = 1 + x; fact = fact …

Member Avatar for xrjf
0
74
Member Avatar for Nicksen

Good day everyone. My assignment is to create a point of sale system for a bakery shop. I have done all the coding up to the part when i have to do a 'order summary details' means i have to put all the user inputs into the order summary details. …

Member Avatar for Schol-R-LEA
0
330

The End.