Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9210201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:00:56+00:00 2026-06-18T01:00:56+00:00

My Instructions: Write a program that starts out asking the user for the mean

  • 0

My Instructions: Write a program that starts out asking the user for the mean u and standard deviation s for the normal distribution (see the wiki article )

The program then asks for an N, and then asks for N values x. For each x it writes out f(x) to the screen. Note that the program asks the user for u, s, and N just once. After that it asks for N values for x, one by one. After each value x it writes out the corresponding value of the function.

What I am confused about is what the N is supposed to stand for. I assumed it was number of x’s but can anyone clarify this for me?

#include <stdio.h>
#define _USE_MATH_DEFINES 
#include <math.h>
#include <stdlib.h>

int main()
{
double u,s, N, x1,math1, math2, math3,n, v, x;

printf("Enter Mean: ");
scanf("%lf", &u);
printf("Enter Standard Deviation: ");
scanf("%lf", &s);
printf("Enter number of x's: ");
scanf("%lf", &N);

    for (v=1; v<=N; v++)
    {
    printf("Enter Value: ");
    scanf("%lf", &x);
    n=(-1/2);
    printf("f(x)= ");
    math1 =1/(u*sqrt(2*M_PI));
    math2= (x-u)/s * (x-u)/s;
    math3= M_E * exp(n);
    x1 = math1 * exp(math3)*exp(math2);
    printf("%lf  \n", x1);
    }
system("Pause");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:00:58+00:00Added an answer on June 18, 2026 at 1:00 am

    N stands for number of inputs

    pretty much clear from this part:
    for (v=1; v<=N; v++)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to write a program that asks the user if they want instructions. If
Instructions: Write a program that will read a line of text that ends with
My instructions: Write a program that repeatedly (until end-of-file) reads in a character from
I'd like to write a python program that allows the user to key an
I need help with my chiper lab. My instructions are: Write a program that
I'm trying to write a simple judge that will compile and execute user submitted
I wanted to write a program that converts a decimal in to binary. For
I'm pretty new to Java, need to write a program that listen to video
I can understand how one can write a program that uses multiple processes or
I'm looking to write a very simple program that can read through an EPS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.