// divisible
#include <stdio.h>
int main()
{
int n=0;
scanf("%d",&n);
if(n%2==0)
printf("Divisible by 2\n");
if(n%3==0)
printf("Divisible by 3\n");
if(n%5==0)
printf("Divisible by 5\n");
if(n%2!=0 && n%3!=0 && n%5!=0)
printf("Not Divisible by 2,3,5\n");
return 0;
}
#include <stdio.h>
#include<math.h>
//farenheit int input, celcius float output
int main()
{
int f;float c;
scanf("%d",&f);
c=(f-32)*(5/9.0);
printf("Celcius temp=%f",c);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n=0;
scanf("%d",&n);
n=1000;
printf("value of n=%d",n);
return 0;
}
#include <stdio.h>
#include<math.h>
int main()
{
printf(" _ _ _ \n");
printf(" _(.)< _(.)> _(.)= \n");
printf("\\___) \\___) \\___) ");
return 0;
}
#include <stdio.h>
int main() {
int x=2;
switch(x)
{
case 1: printf("Choice is 1"); break;
case 2: printf("Choice is 2"); break;
case 3: printf("Choice is 3"); break;
default: printf("Choice other than 1,2,3"); break;
}
return 0;
}
#include <stdio.h>
int main()
{
int r; double v; double pi=22/7.0;
printf("Radius of sphere=");
scanf("%d",&r);
v=(4/3.0)*pi*r*r*r;//int division
printf("Volume of sphere=%lf",v);
return 0;
}
input alphabetical order is edcb
it should show according to numerical order in alphabetical
like it should be bcde
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int i = get_int("number: ");
const int z = i;
while (i > 0)
{
int n = i;
while (n > 0)
{
printf(" ");
n--;
}
int o = z;
while (i <= o)
{
printf("#");
o--;
}
printf(" ");
int u = z;
while (i <= u)
{
printf("#");
u--;
}
i--;
printf("\n");
}
printf("\n");
}