Added book examples
This commit is contained in:
17
C4/wrong_answer.c
Normal file
17
C4/wrong_answer.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Declare and initialiase as required
|
||||
int a = 1,b = 4;
|
||||
float ans;
|
||||
|
||||
ans = a / b; // Perform calculation
|
||||
|
||||
// Display answer
|
||||
printf ("\nThe answer is %f",ans);
|
||||
|
||||
// Exit from program
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user