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
File renamed without changes.
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "linux-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "linux-gcc-x64",
"compilerArgs": [
""
]
}
],
"version": 4
}
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": false,
"cwd": "/workspaces/HTML",
"program": "/workspaces/HTML/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
62 changes: 62 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.cStandard": "",
"C_Cpp_Runner.cppStandard": "",
"C_Cpp_Runner.msvcBatchPath": "",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false,
"files.associations": {
"NEW.C": "cpp"
}
}
74 changes: 74 additions & 0 deletions CHARACTER HANDLING/Area_Of_All.c

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions CHARACTER HANDLING/Char_Digit_Choice.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# include<stdio.h>
#include<ctype.h>
int main(){
char ch, choice;
do {
printf("Enter a character: ");
scanf("\n%c", &ch);
if (isanum(ch)) {
if (isdigit(ch)) {
printf("the character is a digit\n");
} else if (isalpha(ch)) {
if (islower(ch)) {
printf("the character entered is an alphabet(lowercase)\n");
} else if (isupper(ch)) {
printf("the character entered is an alphabet(uppercase)\n");
}
}
} else {
printf("the character entered is a special character\n");
}
printf("\nDo you want to continue? (y/n): ");
scanf(" %c", &choice);
} while (choice == 'y' || choice == 'Y');
return 0;
}
16 changes: 16 additions & 0 deletions CHARACTER HANDLING/New.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# include <stdio.h>
# include <ctype.h>
#include<limits.h>
int main (){
char choice;
do
{
printf("do you wish to comtinue (y/n)? ");
scanf("\n%c",&choice);

}

while(choice=='y'||choice=='Y');
printf("\n existing programme......");
return 0;
}
Binary file added CHARACTER HANDLING/output/Area_Of_All
Binary file not shown.
Binary file added CHARACTER HANDLING/output/Char_Digit
Binary file not shown.
Binary file added CHARACTER HANDLING/output/New
Binary file not shown.
23 changes: 23 additions & 0 deletions PROGRAMS/Do_While_Age.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# include <stdio.h>
int main(){
int age,count=0;
do{
printf("Enter your age:");
scanf("%d",&age);
if(age<0){
printf("age cannot be negative.\n");
count++;
}else if(age==0){
printf("age cannot be zero.\n");
count++;
}else if(age>100){
printf("age cannot be greater than 100.\n");
count++;
}
}while(age<=0||age>100);
if(age>0 && age<=100){
printf("Your age is %d\n",age);
printf("you entered wrong input %d times",count);
}
return 0;
}
17 changes: 17 additions & 0 deletions PROGRAMS/Even_Odd.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<stdio.h>
int main()
{
int inumber;
printf("enter the number");
scanf("%d",&inumber);
printf("%d is %s\n",inumber,(inumber%2==0)?"even":"odd");
if( inumber%2==0)
{
printf("the number is even\n",inumber);
}
else
{
printf("the number is odd\n",inumber);
}
return 0;
}
23 changes: 23 additions & 0 deletions PROGRAMS/Is_Prime_Not_Prime.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <stdio.h>
int main (){
int i,num,count=0;
printf("Enter a Number");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
if(num%i==0)
{
count++;

}
}
if(count==2)
{
printf("the number is prime");

}
else{
printf("the number is not prime");
}
return 0;
}
25 changes: 25 additions & 0 deletions PROGRAMS/Large_Of_3_Numbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include<stdio.h>
int main()

{
int a,b,c;
printf("Enter the value of a,b and c:");
scanf("%d %d %d",&a,&b,&c);
if(a>b){
if(a>c){
printf("a=%d is the largest",a);
}
else{
printf("c=%d is the largest",c);
}
}
else{
if(b>c){
printf("b=%d is the largest",b);
}
else{
printf("c=%d is the largest",c);
}
}
return 0;
}
24 changes: 24 additions & 0 deletions PROGRAMS/Strom_Loop.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>
int main() {
int num, original, digit, fact, sum_digits, i;
printf("Enter a number: ");
scanf("%d", &num);

original = num;
sum_digits = 0;
while (num > 0) {
digit = num % 10;
fact = 1;
for (i = 2; i <= digit; i++) {
fact *= i;
}
sum_digits = sum_digits + fact;
printf("\ndigit=%d sum fact=%d", digit, sum_digits);
num = num / 10;
}

original == sum_digits ? printf("\nSTRONG no") : printf("\nNot STRONG no");
printf("\n I am out of the loop because num=%d...", num);

return 0;
}
Binary file added PROGRAMS/output/Do_While_Age
Binary file not shown.