Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

14th Dec Project1 v0.4

Language: Layout:
+ ] Compiler args - ] Show input
Compilation time: 0.12 sec, absolute running time: 0.14 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0,35 sec 
edit mode |  history  | discussion
Warning(s):
source_file.c: In function ‘main’:
source_file.c:31:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[100]’ [-Wformat=]
     scanf("%s%lf%lf%lf",&CustomerName,&Days,&Miles,&Gallons);
           ^
source_file.c:31:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s%lf%lf%lf",&CustomerName,&Days,&Miles,&Gallons);
     ^
source_file.c:48:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lf%lf%lf%lf%lf",&a,&b,&c,&d,&x);
     ^
----------------------------------------------------------
 Part 1-1
   *
  * *
 * * *
* * * *
Part 1-2
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
----------------------------------------------------------
 Part 2
Enter
Customer name:
     Number of days:
     Number of miles:
     Number of gallons:
------------------------------
     Total Rental Cost:$_______
------------------------------
Customer name:MichaelBeans 
     Num ber of days:2.000000 
     Number of miles:2.000000 
     Number of gallons:2.000000 
------------------------------
     Total Rental Cost:$ 64.000000 _______
----------------------------------------------------------------------
 Part 3
Enter:
a=
b=
c=
d=
x=
F(x)=ax**3+bx**2+cx+d

 You Entered:
a=2.000000
b=3.000000
c=4.000000
d=3.000000
x=2.000000 
F(x)=ax**3+bx**2+cx+d
F(x)=2.000000x**3+3.000000x**2+4.000000x+3.000000
F(2)=43.000000