Computer Science, asked by kalakotasanjana07, 7 months ago

DOTCOITUTEUIT
(or)
4. (a) If money is left in a particular bank for more than 5 years the interest rate given
by the bank is 7.5 percent, else the interest rate is 5.4 percent. write a C program
that uses the scanf() function to accept the number of years in to the variable
mumyrs and display the appropriate interest.
(b) Write a C program to print all integers that are not divisible by either 2 or 3 and
lie between 1 and 100. Program should also count the number of such integers
and print the result.​

Answers

Answered by keyboardavro
1

Answer:

Explanation:

#include <stdio.h>

int main() {

int x, i;

printf("Input an integer: ");

scanf("%d", &x);

 

for(i = 1; i <= 100; i++)

{

 if((i%x) == 3) {

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

 }

}

return 0;

}

Similar questions