Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 2504 points

Mc Mister

Favorite Answers21%
Answers65
  • Engineering Elastic Bodies Question?

    I have been trying to do this question for about 1 week now. None of my professors can do it either. The correct answers are.Ax=320, Ay=-240, Cy=192, V=-57.9, M=289 Resultant at C 400. The question can be found at http://books.google.com/books?id=RULohOkWRxUC&pg=P...

    question 1.2-18. Thanks for any help.

    1 AnswerEngineering8 years ago
  • Wire coming from a spool question?

    Wire is being drawn at a constant rate from a spool by applying a vertical force P to the wire. The Spool and the wire wrapped on the spool have a combined weight of 20 lb. Knowing that the coefficients of friction at both A and B are u(s)=.4 and u(k)=.3, determine the required magnitude of the force P.

    Ok It shows a picture of circle with 2 radi one at 3in and the other at 6in. 6in being the outer and 3in being the inner. It is at the wall where A is the floor and B is the wall. The string is being pulled from the 3in radius. Please help I am really confused. Tried to find Fx=0 and Fy=0 and, the moments but still got the wrong answer. The right answer is 8.34lb I don't know how to get it.

    Engineering9 years ago
  • The electric field at a distance of 0.140m from the surface of a solid insulating sphere?

    The electric field at a distance of 0.140m from the surface of a solid insulating sphere with radius 0.375m is 1640 N/C .

    Calculate the electric field inside the sphere at a distance of 0.206 from the center.

    I am really confused what to do. Can someone show me step by step how to do this? Thanks

    2 AnswersPhysics9 years ago
  • Physics Two very large parallel sheets are 5.00 apart...?

    Two very large parallel sheets are 5.00 apart. Sheet carries a uniform surface charge density of -9.20 , and sheet , which is to the right of , carries a uniform charge of -12.5 . Assume the sheets are large enough to be treated as infinite.

    a.) Find the magnitude of the net electric field these sheets produce at a point 4.00 to the right of sheet .

    b.)Find the magnitude of the net electric field these sheets produce at a point 4.00 to the left of sheet .

    c.) Find the magnitude of the net electric field these sheets produce at a point 4.00 to the right of sheet .

    See my thought was to use E=sigma/2Epsiolon0 and then add that with the other sheet. I got as an answer 1.22543*10^6 which is not the right answer. I believe that all the questions will have the same answer because I don't think position matters when it is like charges. What am I doing wrong?

    1 AnswerPhysics9 years ago
  • Is there going to be a cavestory+ for 3ds?

    And when are they planing on releasing it, I kind of want to buy the dsi version but not if the new one is coming soon.

    1 AnswerVideo & Online Games9 years ago
  • Easy question to answer about C fprintf()?

    I wrote a large program to print to the standard output but now I want to print it to file. Is this valid C syntax?

    [code]

    void outputDecayTable(Isotope * isotope, double initalMass, int years, const char *outputFileName){

    FILE *outputFileName=NULL;

    outputFileName = fopen(fileName, "w");

    fprintf(outputFileName, printDecayTable(Isotope * isotope, double initalMass, int years));

    }

    [/code]

    2 AnswersProgramming & Design9 years ago
  • Is this a funny site?

    http://www.facebook.com/ThingsEngineersSay

    I think it is pretty funny and I know some people who like it but I don't know if it is haha funny. What do you guys think?

    2 AnswersJokes & Riddles9 years ago
  • Array intersections in c programming?

    Ok so this program is supposed to say the values that are common to both arrays with no repeats. The program works some times. I have been going through and trying to do it by hand but it does not seem to be working right.

    int* arrayIntersect(int *size_of_result, const int *a, const int *b, int sizeOfA, int sizeOfB)

    {

    int i=0;

    int j=0;

    int t=0;

    int k=0;

    for(i=0; i<sizeOfA; i++){

    for(j=0; j<sizeOfB; j++){

    if(a[i]==b[j]){

    t++;}}}

    if(t==0){

    return 0;

    *size_of_result=0;}

    int * result = NULL;

    result = (int *) malloc(t * sizeof(int));

    t=0;

    for(i=0; i<sizeOfA; i++){

    for(j=0; j<sizeOfB; j++){

    if(a[i]==b[j]){

    result[t]=a[i];

    t++;}}}

    *size_of_result=t;

    int* result2 = mchelper6(result, &size_of_result);

    free(result);

    return result2;

    }

    int mccounter(int *a, int n, int x){

    int i;

    for(i=0;i<n;i++){

    if(a[i]==x){

    return i;}}

    }

    int* mchelper6(int* result, int **size_of_result){

    int i, j;

    int count=1;

    int n=**size_of_result;

    for(i=1;i<n;i++){

    j=mccounter(result,n,result[i]);

    if(j==i){

    count++;}}

    int * result2 = NULL;

    result2=(int *) malloc(count * sizeof(int));

    result2[0]=result[0];

    for(count=1,i=1;i<n;i++){

    j= mccounter(result,n,result[i]);

    if(j==i){

    result2[count++]=result[i];}}

    **size_of_result=count;

    return result2;

    }

    1 AnswerProgramming & Design9 years ago
  • Removing duplicates in an array. C Programming?

    I am trying to write a program that takes in an array and the size of the array and then outputs a new array without any duplicates. Here is what I have attempted. Any help would be appreciated, I have gotten quite frustrated with it, so if you wish to scrap this code and show me something new I would be open to that.

    int* mchelper(int* result, int **size_of_result){

    int i, t, f;

    t=**size_of_result;

    f=0;

    for(i=1; i<t; i++){

    if (result[i] != result[f]){

    f++;

    }}

    int * result2 = NULL;

    **size_of_result=(f+1);

    printf("WHAT SIZE IS %d\n", **size_of_result);

    result2 = (int *) malloc((**size_of_result) * sizeof(int));

    for(i=0; i<t+1; i++) {

    result2[i] = result[i];}

    f=0;

    for(i=1; i<t; i++){

    if (result2[i] != result2[f]){

    f++;

    result2[f]=result2[i];

    }}

    return result2;}

    Go number 2

    int* mchelper2(int* result, int **size_of_result){

    int i, t, f, j;

    t=**size_of_result;

    int * result2 = NULL;

    result2 = (int *) malloc((**size_of_result) * sizeof(int));

    f=0;

    for(i=0; i<t+1; i++) {

    result2[i] = result[i];}

    for(i=0; i<t; i++){

    for(j=0; j<t; j++){

    if (result[i] == result2[j]){

    break;}}

    if(j==t){

    result2[t]= result[i];

    t++;}

    }

    f=t;

    int * result3 = NULL;

    **size_of_result=(f);

    result3 = (int *) malloc((**size_of_result) * sizeof(int));

    for(i=0; i<t+1; i++) {

    result3[i] = result2[i];}

    f=0;

    for(i=0; i<t; i++){

    for(j=0; j<t; j++){

    if (result[i] == result2[j]){

    break;}}

    if(j==t){

    result2[t]= result[i];

    t++;}

    }

    free(result2);

    return result3;}

    2 AnswersProgramming & Design9 years ago
  • C program to remove white space?

    I am trying to write a program for some one to remove white space from arrays. This sounds really easy, but for some reason it is not working.

    void removeBlanks(char *dest, const char *src){

    int n = strlen(src);

    int i;

    int size=0;

    int f=0;

    for(i=0; i<n; i++) {

    if(src[i] == ' ') {

    size++;}}

    dest= malloc(sizeof(char) * (n + 1 -size));

    for(i=0; i<n; i++) {

    if(src[i] != ' ') {

    dest[f]=src[i];

    f++;}}

    }

    By the way take a look at my other question on removing duplicates and please help me out on that one too if you have the time. Thanks a lot everyone.

    2 AnswersProgramming & Design9 years ago
  • Why is this seg faulting? C programming.?

    /* Angel

    * Last modified by Angel

    *

    * stats.c

    * Generates a list of random numbers and finds the

    * mean, mode, min, and max.

    *

    */

    #include <stdio.h>

    //#include "stats.h"

    /*Function prototype */

    void buildArray(int numList[], int size);

    double findMean(int numList[], int size);

    int findMin(int numList[], int size);

    int findMax(int numList[], int size);

    int main(int argc, char** argv)

    {

    int min, max, size;

    double mean;

    printf("Enter the amount of numbers you'd like to find the stats for: ");

    scanf("%d", &size);

    int numList[size];

    buildArray(numList, size);

    /*Pass the appropriate variables into your functions here*/

    min = findMin(numList, size);

    max = findMax(numList, size);

    mean = findMean(numList, size);

    printf("Min: %d\n", min);

    printf("Max: %d\n", max);

    printf("Mean: %.2lf\n", mean);

    return 0;

    }

    //Fills numList with random numbers

    void buildArray(int numList[], int size)

    {

    int i;

    printf("Enter your list of numbers: ");

    for (i = 0; i < size; i++)

    {

    scanf("%d", numList[i]);

    }

    }

    //Write your code here to find the mean of numList

    double findMean(int numList[], int size)

    {

    int i=0;

    double sum=0;

    for(i=0; i<size; i++){

    sum+=numList[i];}

    sum=(sum/size);

    return sum;

    }

    //Fill out the function parameters and definition to find the min

    int findMin(int numList[], int size)

    {

    int i=0;

    int temp=0;

    int min=0;

    for(i=0; i<size; i++){

    if(i==0){

    min=numList[i];}

    if(min>numList[i]){

    min=numList[i];}}

    return min;

    }

    //Fill out the function parameters and definition to find the max

    int findMax(int numList[], int size)

    {

    int i=0;

    int temp=0;

    int max=0;

    for(i=0; i<size; i++){

    if(i==0){

    max=numList[i];}

    if(max<numList[i]){

    max=numList[i];}}

    return max;

    }

    1 AnswerProgramming & Design9 years ago
  • Programming in C compound operators?

    I don't know how to simplify these functions

    z = z + r * m; //thought is z+=(r*m);

    m = m * y + 1;// was thinking m*=(y)+1; but don't think that is the same

    x = x - (a + b - c); //thought is x+=-(a+b-c);

    I am not sure if there is a shorter way to write all of these. Help please. They all need an equilavent compound assignment operator.

    2 AnswersProgramming & Design9 years ago
  • C programming question?

    Assume that the integer x has a value of 6 and is located at memory location 300 (decimal).

    Assume y has a value of 11 and is located at memory location 421 (decimal). What would be the value

    of the following expressions:

    (a) x + y

    (b) (int)&x + y

    (c) (int)&x + (int)&y

    (d) *(&x) + *(&y)

    (e) (int)&x + *(&y)

    I have no idea how to do this, please explain the process with how you get to the answers.

    2 AnswersProgramming & Design9 years ago
  • I need help with compound assignment operators in C.?

    Alright here are the ones I don't know how to simplify.

    z = z + r * m; //thought is z+=(r*m);

    m = m * y + 1;

    x = x - (a + b - c); //thought is x+=-(a+b-c);

    I am not sure if there is a shorter way to write all of those. Help please. They all need an equilavent compound assignment operator.

    1 AnswerProgramming & Design9 years ago
  • What is wrong with my functions in C?

    /* Created by Tony Schneider on 1/29/2012

    * Last Modified by Tony Schneider on 1/29/2012

    *

    * physicsCalc.c

    * Used to determine the force of an object.

    */

    #include <stdio.h>

    double getvelocity(double *distance, double *time);

    double getacceleration(double *velocity, double *initVelocity, double *time);

    double getforce(double *mass, double *acceleration);

    int main(int argc, char **argv)

    {

    double distance, time, initVelocity, mass;

    printf("Enter the distance the object travled(m): ");

    scanf("%lf", &distance);

    printf("Enter the time it took to travel that distance(s): ");

    scanf("%lf", &time);

    printf("Enter the initial velocity of the object(m/s): ");

    scanf("%lf", &initVelocity);

    printf("Enter the mass of the object(g): ");

    scanf("%lf", &mass);

    /*Call your written functions here*/

    getvelocity(&distance, &time);

    getacceleration(*velocity, &initVelocity, &time);

    getforce(&mass,*acceleration);

    /*Print the result here*/

    printf("The Velocity is %f \n", *velocity);

    printf("The Acceleration is %f \n", *acceleration);

    printf("The Force is %f \n", *force);

    return 0;

    }

    void getvelocity(double *distance, double *time){

    double velocity;

    *velocity=*distance/ *time;

    }

    void getacceleration(double *velocity, double *initVelocity, double *time){

    double acceleration;

    *acceleration=(*velocity-*initVelocity)/ *time;

    }

    void getforce(double *mass, double *acceleration){

    double force;

    *force=mass/acceleration;

    }

    1 AnswerProgramming & Design9 years ago
  • Switching for to a while loop?

    Ok I am supposed to switch the for loops to while loops but I don't know exactly how to do it or where to place them.

    /*

    * Written by Stephen Mkandawire

    * 01-29-2012

    */

    #include <stdio.h>

    #include <stdlib.h>

    #include <math.h>

    int check_triangle(int side1, int side2, int side3);

    int is_triangle(int side1, int side2, int side3);

    int main(int argc, char *argv[]) {

    int side1, side2, side3, max_length, triangle_type;

    int num_triangles = 0, not_triangle = 0, right_angle = 0, obtuse = 0, acute = 0, right_angle_scalene = 0;

    int isosceles = 0, scalene = 0, equilateral = 0;

    if((argc != 2) || (atoi(argv[1]) == 0)){

    fprintf(stderr, "Usage: %s max_int_length\n", argv[0]);

    exit(1);

    }

    max_length = atoi(argv[1]);

    for (side1 = 1; side1 <= max_length; ++side1)

    for (side2 = 1; side2 <= max_length; ++side2)

    for (side3 = 1; side3 <= max_length; ++side3)

    if(is_triangle(side1, side2, side3)){

    /*2. Write the source code here

    to determine whether a given triangle is right angled or obtuse or acute*/

    ++num_triangles;

    if(((pow((side1),2.0)+pow((side2),2.0))==pow(side3,2))||((pow((side2),2.0)+pow((side3),2.0))==pow(side1,2))||((pow((side3),2.0)+pow((side1),2.0))==pow(side2,2))){

    right_angle++;}

    else if(((pow((side1),2.0)+pow((side2),2.0))<pow(side3,2))||((pow((side2),2.0)+pow((side3),2.0))<pow(side1,2))||((pow((side3),2.0)+pow((side1),2.0))<pow(side2,2))){

    obtuse++;}

    else{acute++;}

    triangle_type = check_triangle(side1, side2, side3);

    switch(triangle_type) {

    case 1:

    ++equilateral;

    break;

    //3. case for isosceles

    case 2:

    ++isosceles;

    break;

    //4. case for scalene

    case 3:

    ++scalene;

    if(((pow((side1),2.0)+pow((side2),2.0))==pow(side3,2))||((pow((side2),2.0)+pow((side3),2.0))==pow(side1,2))||((pow((side3),2.0)+pow((side1),2.0))==pow(side2,2))){

    right_angle_scalene++;

    }

    break;

    default :

    fprintf(stderr, "Unknown triangle type\n");

    }

    }

    else{

    ++not_triangle;

    }

    printf("There are %d triangles out of %d side combinations\n", num_triangles, num_triangles + not_triangle);

    printf("Right angle = %d, Obtuse = %d, and Acute = %d\n", right_angle, obtuse, acute);

    printf("Equilateral = %d, Isosceles = %d, and Scalene = %d\n", equilateral, isosceles, scalene);

    printf("Out of the %d scalene triangles %d are right angled\n", scalene, right_angle_scalene );

    return 0;

    }

    int check_triangle(int side1, int side2, int side3){

    //Equilateral

    if (side1 == side2 && side1 == side3){

    return 1;

    }

    //Isosceles

    else if (side1 == side2 || side1 == side3 || side2 == side3){

    return 2;

    }

    //Scalene

    else if (((side1 != side2) && (side1 != side3))|| ((side2 != side1) && (side2 != side3)) || ((side3 != side1) && (side3 != side2))){

    return 3;

    }

    return -1;//Not executed

    }

    int is_triangle(int side1, int side2, int side3){

    //1. Determines whether it’s a triangle of not. Returns 1 if it’s a triangle and 0 otherwise.

    if(side1+side2>side3&&side3+side2>side1&&side1+side3>side2){

    return 1;}

    return 0;

    }

    3 AnswersProgramming & Design9 years ago
  • Principal question programming c?

    c:23:50: warning: incompatible implicit declaration of built-in function âpowâ

    I don't understand what the warning is about and also it only allows me to input the principal and that's it which is weird. Here is the code, please help, explanations on the concepts behind it are much appreciated also.

    /*Name: Angel

    * Date: 02/05/2012

    * This program prints a table of a customized

    * loan amortization table. It reads in the

    * input from the user, principal, annual

    * interest rate and the number of monthly payments*/

    #include <stdio.h>

    int main(void)

    {

    double principal;

    double interest;

    double time;

    double monthlyPayment;

    double balance;

    int i;

    printf("Principal:");

    scanf("lf", &principal);

    printf("Annual Interest Rate:");

    scanf("lf",&interest);

    printf("Term:");

    scanf("lf",&time);

    monthlyPayment=(principal*interest*(1/1200))/(1-pow((1+interest*(1/1200)),(-time)));

    printf("Monthly Payment: $%.2f\n",monthlyPayment);

    printf("Payment Interest Principal Balance");

    for (i=1; i<=time; i++){// subtracts 1 till it gets to 2

    interest=principal*(interest/1200);

    balance=principal-(monthlyPayment-interest);

    principal=principal-balance;

    printf("%d %.2f %.2f %.2f\n", i, interest, principal, balance);

    }

    printf("\n");//used to end the line to the next command

    return 0;

    }

    2 AnswersProgramming & Design9 years ago
  • Programming question for printing 10 things?

    I have a couple questions is i!%10 a legal statement and what does it mean? But here is the real question: I am supposed to Prints all even integers 2 thru 200 on 10 di erent lines (10 numbers on each line) in reverse order. Here is what I have so far but not sure why it isn't working. What is wrong? Has to be a for loop by the way.

    /*Name: Angel

    * Date: 02/05/2012

    * This program prints all integers

    * 2 through 200 in reverse order 10 a line.*/

    #include <stdio.h>

    int main(void)

    {

    int i; //what get added

    int n=2;//number of times

    for (i=200; i>=n; i--){// subtracts 1 till it gets to 2

    if (i%10){

    printf("%d \n", i);}

    else if(!(i%10)){

    printf ("%d", i);

    }

    }

    return 0;

    }

    2 AnswersProgramming & Design9 years ago
  • Why do I get an error, c programming?

    I get an error saying that there was an expected expression at the => I don't know what is wrong, also my last number was negative before any ideas?

    /*Name: Angel

    * Date: 02/05/2012

    * This program prints all integers

    * 2 through 2147483648 by a power of 2 .*/

    #include <stdio.h>

    #include <math.h>

    int main(void)

    {

    int i; //what get added

    int n=31;//number of times

    int num;

    for (i=0; i=<n; i++){// adds 1 till it gets to 100

    num=pow(2,i);

    printf("%d \n",num);

    }

    return 0;

    }

    3 AnswersProgramming & Design9 years ago
  • Questions on short circuiting, c programming?

    Which parts of the expressions are not evaluated due to short circuiting?

    int a = 10;

    int b = -5;

    int c = 15;

    int flag = 1;

    (a) c == b - a || !flag

    (b) a != -a || !flag && c <= (-b * a)

    (c) !(a % b) && b <= -5

    (d) (a > 15) || c < a + b

    (e) !!a == 10 && c >= 15 || b

    I think the answers are:

    a. Everything after the b in the equation gets short circuited.

    b. Everything after the c gets short circuited.

    c. Everything after the second b gets short circuited.

    d. Everything after the 15.

    e. Nothing.

    I am not sure and am really bad at this, could some explain to me the idea and the solutions. And any errors in my thinking. Thanks.

    5 AnswersProgramming & Design9 years ago