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
18 changes: 18 additions & 0 deletions Basic_1.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// TASK
// Write code to find if the number is even or odd
// Code Below
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
printf("enter the no. to find out whether it is even or odd");
scanf("%d",&a);
if(a%2==0)
{
printf("no. is even");
}
else
{
printf("no. is odd"0);
}
getch();
}
12 changes: 12 additions & 0 deletions Basic_12.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// TASK
// Write code to find cube of a number
// Code Below
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b=0,c;
printf("enter the no to take out its cube = ");
scanf("%d",&a);
b=a*a*a;
printf("cube of no. is = %d",b);
getch();
}
6 changes: 3 additions & 3 deletions Challenge_15.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <stdio.h>
int main()
{
int num1, num2, flag_var, i, j;
int num1, num2, num3, flag_var, i, j;

printf("Enter two range(input integer numbers only):");

scanf("%d %d", &num1, &num2);
scanf("%d %d %d", &num1, &num2 , &num3);


printf("Prime numbers from %d and %d are:\n", num1, num2);
printf("Prime numbers from %d and %d are:\n", num1, num2, num3);

//CODE

Expand Down