WS 7

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

1)

#include<stdio.h>

float PROPERTY_TAX_CALC(float);

int main()

float a,b;

scanf("%f",&a);

printf("Assessed Value : %.2f",a);

b=PROPERTY_TAX_CALC(a);

printf("\nTaxable Amount : %.2f\nTax Rate for each RS.100 : 1.05\nProperty Tax : %.2f",b,
(b/100)*1.05);

float PROPERTY_TAX_CALC(float x)

int a;

a=x*(0.92);

return(a);

2)

#include<stdio.h>

void SPECIAL_NUMBER(int x);

int main()

int a;

scanf("%d",&a);

SPECIAL_NUMBER(a);

}
void SPECIAL_NUMBER(int x)

int b,c,d,e,f;

b=x%100;

c=b%10;

d=x/100;

e=b/10;

f=d+e;

(f==c)?printf("%d is a special number",x):printf("%d is not a special number",x);

3)

#include<stdio.h>

void NEWNUM(int);

int main()

int a;

scanf("%d",&a);

NEWNUM(a);}

void NEWNUM(int x)

int a,b,c,d,e;

a=x/10000;

b=x/1000;

b=b%10;

c=x%1000;

c=c/100;

d=x%100;
d=d/10;

e=x%10;

if(d>=9)

printf("%d%d%d0%d",a+1,b+1,c+1,e+1);

else

printf("%d%d%d%d%d",a+1,b+1,c+1,d+1,e+1);

5)

#include<stdio.h>

#include<string.h>

void VOW_CON(char [],int);

int main()

char a[50];

int x;

scanf("%s",a);

x=strlen(a);

VOW_CON(a,x);

void VOW_CON(char a[],int x)

int v=0,c=0;

for(int i=0;i<x;i++)

if(a[i]=='A'||a[i]=='a'||a[i]=='e'||a[i]=='E'||a[i]=='I'||a[i]=='i'||a[i]=='o'||a[i]=='O'||a[i]=='u'||
a[i]=='U')

v++;
else

c++;

printf("%d %d",v,c);

10)

#include<stdio.h>

int s=0;

void process(int [],int);

void min(int[],int);

void profit(int[],int);

int main()

int n;

scanf("%d",&n);

int a[n];

for(int i=0;i<n;i++)

scanf("%d",&a[i]);

process(a,n);

min(a,n);

profit(a,n);

void process(int a[],int x)

for(int i=0;i<x;i++)

s=s+a[i];

printf("%d",s);
}

void min(int a[],int x)

int l;

l=a[0];

for(int i=0;i<x;i++)

if(l>a[i])

l=a[i];

printf("\n%d",l);

void profit(int a[],int x)

printf("\n%.2f",float(s*0.15));

You might also like