Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions do_it.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef DO_IT_H
#define DO_IT_H

float DO_IT_H(char x,char y,char z);

#endif // DO_IT_H
1 change: 1 addition & 0 deletions doit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions done.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define AGE 20
54 changes: 39 additions & 15 deletions main.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
#include <ctype.h>
#include <stdio.h>

main(){
char some_string[] = {};
for (int i = 0; i < 20; ++i) {
scanf("%s", some_string);
if (some_string[i] == EOF)
{
break;
}
}
putchar(some_string);

}
#include <stdio.h>
#include <stdlib.h>

int main()
{
long int digits[50];

digits[49] = 123.456;

printf("Values of X\n");
int x;
for (x=0; x<100; x++){
printf(" %d\t",x);
} /*final value of x is 99*/

printf("\n\nValues of ctr\n");
int ctr;
for (ctr=2; ctr<10; ctr+=3){
printf(" %d\t",ctr);
} /*final value of ctr is 8*/

printf("\n\nCounting from 1 to 100\n");
int count=1;
while(count<=100){
printf(" %d\t",count);
count +=3 ;
}

/* for (counter = 1; counter < MAXVALUES; counter ++);
printf("\n Counter = %d", counter); */

/* Problems in the above code are; MAXVALUES not declared to a specific data type,
counter not declared an integer, curly braces not used after the 'for' condition,
and the 'for loop' was wrongly terminated before printf statement.*/


return 0;
}

6 changes: 6 additions & 0 deletions print_a_number.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef PRINT_A_NUMBER_H
#define PRINT_A_NUMBER_H

float PRINT_A_NUMBER_H(int a);

#endif // PRINT_A_NUMBER_H
44 changes: 44 additions & 0 deletions question two.cbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="question two" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/question two" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/question two" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="main.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>