01 C program to print "hello world".
#include<stdio.h>
int main(){
printf("Hello world");
return 0;
}
02 C program to add two numbers in c.
#include<stdio.h>
int main(){
int a,b,sum;
scanf("%d %d",&a,&b);
sum = a + b;
printf("%d",sum);
return 0;
}
03 C program to accept a string from users and print it.
#include<stdio.h>
int main(){
char str[20];
scanf("%s",&str);
printf("%s",str);
return 0;
}
04 C program to check a given number is positive or negative.
#include<stdio.h>
int main(){
int num;
scanf("%d",&num);
if(num ==0)
printf("Number is zero.");
else if(num > 0)
printf("Number is positive.");
else
printf("Number is negative.");
return 0;
}
05 C program to swap two numbers.
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d",&a,&b);
c = a;
a = b;
b = c;
printf("%d %d",a,b);
return 0;
}
06 C program to find area of a circle.
#include<stdio.h>
int main(){
floar r,area;
printf("Enter radius of circle: ");
scanf("%f",&r);
area = 3.14 * r * r;
printf("Area of circle is: %f",area);
return 0;
}
1xbet - No 1xbet Casino | Live dealer casino online
ReplyDelete1xbet novcasino is a reliable casino site that offers a great casino https://deccasino.com/review/merit-casino/ games from the best software providers for the regulated gambling markets. Rating: 1xbet korean 8/10 · Review by a Tripadvisor user · https://access777.com/ Free · sol.edu.kg Sports