77 313
Assignments Done
99,2%
Successfully Done
In July 2019

Questions: 285

Free Answers by our Experts: 208

Ask Your question

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a C program to read 1 integer input from user. Multiply 3 to the input, convert the result to string and print the result.
Write a C program to read 1 integer input and 1 float input from user. With the inputs, calculate the quotient and print it to screen.
Kesa has changed RS as per unit consumption is one month as per the following condition-

1) unit>=200-> 0.50 paise/unit

2) unit>100 and unit <200->0.60 per/unit

3) unit> 50 and unit<100->0.70 per/unit

4) otherwise 0.8 per/unit

Note- 50 RS meter changes will also add.
The following data has been collected by a technician:
Gas volume: V=0.8 m^3
Gas pressure: p=160 kPa
Compression index: n=1.4
Pressure/volume relationship: pV^n=C
Work done = ∫(V1)^(V2) pdV


Evaluate C

Calculate the work done in compressing the nitrogen from 0.8 m^3 to 0.6 m^3 using:
integral calculus
Simpson’s rule
the mid-ordinate rule
You will have an orthogonal triangle input from a file and you need to find the maximum sum of the numbers according to given rules below;

1. You will start from the top and move downwards to an adjacent number as in below.
2. You are only allowed to walk downwards and diagonally.
3. You can only walk over NON PRIME NUMBERS.
4. You have to reach at the end of the pyramid as much as possible.
5. You have to treat your input as pyramid.

According to above rules the maximum sum of the numbers from top to bottom in below example is 24.

*1
*8 4
2 *6 9
8 5 *9 3

As you can see this has several paths that fits the rule of NOT PRIME NUMBERS; 1>8>6>9, 1>4>6>9, 1>4>9>9
1 + 8 + 6 + 9 = 24. As you see 1, 8, 6, 9 are all NOT PRIME NUMBERS and walking over these yields the maximum sum.
Write a C program to check two given integers whether either of them is in the range 100..200 inclusive.
A university computer science department has a teaching assistant (TA) who helps undergraduate students with their programming assignments during regular office hours. The TA’s office is rather small and has room for only one desk with a chair and computer. There are three chairs in the hallway outside the office where students can sit and wait if the TA is currently helping another
student. When there are no students who need help during office hours, the TA sits at the desk and takes a nap. If a student arrives during office hours and finds the TA sleeping, the student must awaken the TA to ask for help. If a student arrives and finds the TA currently helping another student, the student
sits on one of the chairs in the hallway and waits. If no chairs are available, the student will come back at a later time.
Using threads, mutex locks, and semaphore implement a solution that coordinates the activities of the TA and the students.
Q3 Example Questions:
For each example question, use a record that contains two fields, id and gpa. id is an integer and gpa is a float. (for the list problem, it also has a NEXT field which is a pointer to the structure). Write a complete program that demonstrates the solution to the problem.

(a) Stack: Create 3 records ( {100,2.0}, {200,3.0}, 300,3.8} ). Use a stack to print them out in reverse order. The stack has a size of 5.

(b) Queue: Create 3 records ( {100,2.0}, {200,3.0}, 300,3.8} ). Insert them in a queue. Empty out the queue and print out the structures. The queue has a size of 5


(c) Write a program that inserts these structures in an ordered linked list. ( {100,2.0}, {200,3.0}, 300,3.8}. The list needs to be ordered by gpa.
I want to write a program that finds prime numbers using a sieve of Eratosthenes method.
I must use (variable length array) vom Typ bool.
I wrote the following code, but unfortunately it does not work.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main()
{ int n,i;

printf("Enter the limit: ");
scanf("%d",&n);
int size = sizeof(A)/ sizeof(n);

prim(A,size);

for(i=2;i<n;i++)
{
if(A[i])
{
printf("\n%d",i);
}
}

return 0;
}
bool prim(int* A, int size)
{
int i,j;
for(i=2;i<n;i++)
A[i] = true;


for(i=2;i<n;i++)
{
for(j=i;i*j<n;j++)
{
A[i*j] = false;
}
}
}
can you help me please?
• Create or find 3 files containing C programs such as the one given below
#include <stdio.h>
struct time {
int hour,min;
};
typedef struct {
int flightno;
struct time arrival;
}FlightInfo;

void inp(FlightInfo arr[]){
int i;
for (i=0;i<2;i++)
{
printf("Enter flight no and arrival time:");
scanf("%d %d %d",&arr[i].flightno,&arr[i].arrival.hour,&arr[i].arrival.min);}}
void calculateDelay(FlightInfo arr[], int d){
int i,x;
for (i=0;i<2;i++) {
• For the three C programs,
◦ Read the file name from the user and open the file
◦ Read the C program from the text file and find the
▪ number of statements in the program
▪ number of for, while and do-while loops in the program
Output
Sample Run:
Program named “flights.cpp” contains:
53 lines of code
3 for loops
2 while loops
1 do-while loop
Program named “hw.cpp” contains:
45 lines of code
1 for loop
3 while loops
0 do-while loop
Submit
Privacy policy Terms and Conditions