Answer the question
In order to leave comments, you need to log in
I get an error Error C4700 uninitialized local variable used how to fix?
#define _CRT_SECURE_NO_WARNINGS
#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#pragma warning(disable : 4996)
// do when win
double winWay(double a, double b)
{
return a + b;
}
// do when lose
double loseWay(double a, double b)
{
return a - b;
}
// randomizer
double dr(double zb)
{
return zb = (rand() % 100) / (100 * 1.0);
}
// Program
void main()
{
printf("make a stake 100 on 1, or 0, your money 1000");
double a, b, e, d;
scanf("%lf", &e);
a = 1000;
b = 100;
printf("%lf", dr(double zb));
if (d == e)
{
printf("Win! your cash:%lf", winWay(a, b));
double a = winWay(a, b);
}
else
{
printf("Lose your cash:%lf", loseWay(a, b));
double a = loseWay(a, b);
}
system("pause");
}
Answer the question
In order to leave comments, you need to log in
#include "stdio.h"
#include "stdlib.h"
double dr(double zb)
{
return zb = (rand() % 100) / (100 * 1.0);
}
if (d == e)
{
printf("Win! your cash:%lf", winWay(a, b));
double a = winWay(a, b);
}
double a
— we consider that a has been determined. = winWay(a, b)
- we believe that SHE is used, and not the earlier a. Naturally, uninitialized. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question