No, "Lf" is for long double and I don't use long. For double is "lf" correct.
#include <stdio.h>
int main(void)
{
long double c = 42.0;
Type: Posts; User: Kernelpanic
No, "Lf" is for long double and I don't use long. For double is "lf" correct.
#include <stdio.h>
int main(void)
{
long double c = 42.0;
Of course, because your variable declaration doesn't make sense.
circumference = diameter * pie; - is what?
//Konfuse Deklaration - 5. Sept. 2020
//Program to find area, circumference...
Which trick?
Now is the arrangement of the alphabet really random. "srand" sets a random starting point for "rand" at every start.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include...
That's another version. But it is always the same arrangement of the alphabet.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAT 10
The program run almost correct; "j" is redundant.
int main(void)
{
int n; //i -> NO!
printf("--- Fibonacci series program ---\n");
printf("Enter a number:");
@laserlight - elegant solution! Clear and straight. Unfortunately not from me. :frown:
The search for an iterative solution was nonsense.
Thank you!
I don't know whether the recursion ist part of the exerice but whether the solution is recursiv or iterativ the solution have to start from the last calculation.
15626
I dont no whether this...
Look that:
15625
He have to start from the end.
That's a first try:
#include <stdio.h>
See my correction - he have to start from the end.
@laserlight - He have to start from the end. - I will try it tomorrow.
Have I say tomorrow? Today!
1,2121...
@Igor, I know that is not the right solution, and it is iterativ, but maybe a way there . . .
It is an interesting task. - At until the solution: Take it easy!
#include <stdio.h>
#include...
I know the Linux(Unix)-philosophy since 1996; a little bit. Windows was always my first system but Linux, SuSE-Linux, was a hobby from 1996 to 2010/2011. And more, I was a sponsor of Linux - I have...
You do exactly what I can not stand, you turn a job into an ideology.
Programming is also nothing more than building a scaffolding clean without it collapsing, or a mechanician who repairing a...
No, he is a human, not a new The Lord. He is only a human and no one is without mistakes.
@Christop - No, No, No, the program from K&R is not correct.
A program has to terminated with a simple commando. Not with "String-D" or "String-C" or what ever. That's no correct!
And this...
And this is my version:
15617
Also under Linux it works correct.
That's the same file in the Linux-World (Console Linux openSuSE 15 Leap):
15616
Original code:
#include <stdio.h>
#define IN 1
#define OUT 0
Small correction:
do
{
c = getchar();
char_number++;
if (c == '\n')
{ new_line++; }
The K&R program run correct, almost . . . no termination condition. The gentlemen K&R don't like this. :rolleyes:
Your code: For what "y"? In line 12: int c = 0; And "return(0);" is missing.
...
Of course, there was only one screen under MS-DOS, but for example one could programming windows with the graphics library that came with QuickC 2.5 a little bit a la Windows. One could create a kind...
int main(void)
. . .
return(0);
15605
God damn, I'm getting another crisis! This little program is full of pitfalls ... :tongue: Last version! The Lord is with me! ;)
#include <stdio.h>
#include <stdlib.h>
void main(void)
{
There was a (little) mistake when the input is over forty.
#include <stdio.h>
#include <stdlib.h>
void main(void)
{