# include <stdio.h>
int main () {
int a;
printf("Enter your AGE \n");
scanf("%d", &a);
if(a >=18){
printf("You are adult \n");
printf("You can vote easly in india \n");
printf("You have to find jod \n");
}
else if( 13 && 18){
printf("helooo ");
printf("YOU are note adult but...\n ");
}
else{
printf ("your are not human \n");
}
printf(" Thank you very much \n");
float Ayush,Bhardwaj;
printf ("Enter Any NO.");
scanf("%f", &Ayush);
printf("Enter Any NO.");
scanf("%f", &Bhardwaj);
printf("Heloo you got your no. back by sum of that...= %f \n",Ayush+Bhardwaj);
int d,b;
d = 3;
b = 2;
# include <math.h>
int power=pow(d,b);
printf("HERE WE INCREASE THE POW...0F NO. %d \n",power);
printf("thanks \n");
int day;
printf("Enter ANY DAY(1to7)");
scanf("%d",&day);
switch(day){
case 1: printf("This day is monday \n");
break;
case 2: printf("This day is tuesday \n");
break;
case 3:printf("This day is wednesday \n");
break;
case 4: printf("This day is thursday \n");
break;
case 5: printf("This day is friday \n");
break;
case 6: printf("This day is saturday \n");
break;
case 7: printf("This day is sunday \n");
break;
}
printf("Thanks bro \n");
//this is assigment
int f;
printf("Enter your marks \n");
scanf("%d",&f);
if (f <= 30) {
printf("C \n");
}
else if (f >= 30 && f <= 70) {
printf("B \n");
}
else if(f >= 70 && f <=90){
printf("A \n");
}
else if (f >= 90 && f <= 100){
printf("A+ \n");
}
else {
printf("WRONG VALUE \n");
}
// for(int a = 12; a <= 100; a = a+1) // [for *for loop*]
int i = 1;
while(i<=5){ // (FOR **WHILE** LOOP)
printf("%d\n",i);
i++;
}
// for table:of any no. that user put..
int main(){
int a;
printf("Enter as no., do you want for table \n");
scanf("%d",&a);
for(int i = 1; i <= 10; i++){
printf("%d\n",i*a);
}
do{
printf("enter a value");
}while(i<=5);
// USER LOOP
int q;
do{
printf("enter your no.\n");
scanf("%d",&q);
// printf("%d\n",q);
if(q % 2 != 0){
break;
}
}while(1);
printf("thankx");
void ayushhello();//declaration/prototype
int main (){ //function call
ayushhello();
return 0;
}
//funtion definition
void ayushhello(){
printf("helo!\n");
}
void namasthe();
// void bonjour();
// int main (){
// printf("please enter i if you are indian or f:\n");
// char ch;
// scanf("%c",&ch);
// if(ch == 'i'){
// namasthe();
// }
// else if (ch == 'f'){
// bonjour();
// }
// else {
// printf ("invalide segment");
// }
// return 0;
// }
// void namasthe(){
// printf("NAMASTHE , You are indian\n");
// }
// void bonjour(){
// printf("bonjour, you are not indian\n");
// }
// this is functioon code for sum(+);
int malang(int n ,int m){
return n + m;
}
int main(){
int a,b;
printf("Enter 1st no.");
scanf("%d",&a);
printf("Enter 2nd no.");
scanf("%d",&b);
int c = malang(a,b);
int f = c;
printf("sum is. this : %d",f);
return 0;
}
// this program gives v;;;;;;;
# include <stdio.h>
int main(){
float u,a,t;
printf("THIS THE C PROGRAM WHICH GIVE FINAL VELOCITY\n");
printf("Enter the intial velocity :\n");
scanf("%f",&u);
printf("Enter the acceleration :\n");
scanf("%f",&a);
printf("NOW enter the time:\n");
scanf("%f",&t);
float v = u+a*t;
float s = u*t+(1/2)*a*t*t;
if (t > 0){
printf("This is the final velocity %f\n",v);
printf("This is the distance%f\n",s);
}
else{
printf("the time is -ve\n");
}
return 0;
}
return 0;
}}