Posts

Showing posts from September, 2023

Introduction to Programming Language

Image
 

C Programming - Assignment - 5

 Assignment - 5 ------------------- Write a program to input a number and print it’s all the factor Write a program to input a number and print all its non factors Write a program to input a number and count the number of factors of the number Write a program to input a number and check it is a prime number or not Write a program to input a number and print its multiplication table. For example if the number is 2 , multiplication table would be 2, 4, 6, 8, 10, 12, 14, 16, 18 , 20 Write a program to input a number and check whether the number is a perfect number or no Write a program to input a number and find the difference of the sums of its factors and non factors. Write a program to input a three digit number and find the sum of the digits [ say n= 456 then answer : 15 ] Write a program to input any digit number and find the sum of the digits. Write a program to input any digit number and then reverse the digit [ say n=567 then y=765] Write a program to input the base and power valu

Assignments [ Assignment 4 ] - C Programming

 Assignment - 4 ------------------- Write a program to print your name 10 times. Write a program to print the values from 1 to 10 Write a program to print the values from 20 to 60 Write a program to print the values from 80 to 60 Write a program to print all even values from 1 to 20 Input last limit and print all the numbers between 1 to that limit Input first and last limits and print all the numbers between the limits Input the first and last limits and print all the even numbers between those limits Input first and last limits and print all the numbers between those limits which are divisible by 2 but not divisible by 3 Write a program to find the sum of all the numbers between 1 to 10 Write a program to find the sum of only even values between 1 to 10 Write a program to find the difference between the sums of even and odd values between 1 to 10 Input two limits and find the sum of all those numbers which are divisible by 2

Assignments [ Assignment 3 ] - C Programming

Assignment - 3 ------------------- Note: All the questions in this assignments can be done using if..else and switch cases. 1.      Write a program to input BD[ Birthday], BM[Birth Month], BY [ Birth Year ], CD[ Current day ], CM [ current Month ], CY [ Current Year]. Then calculate the age of a person. One should display the output in the following format   Your Age Today is :   …………………… Day(s).   …………………… Month(s).   …………………. Year(s). 2.      Input the marks of five subjects. Then print the grade : the calculation of grade is as : a.      %marks more than 50 but less than equals to 60 – GRADE C b.      More than 60 but less than equals to 70 – GRADE B c.       More than 70 – GRADE A d.      Less than 50 – FAIL 3.      Jack makes some purchases from xyz departmental store. He gets some discount on purchases made :   Purchases more than 1000 but less then 1500 – 10% discount, more than 1500 but less than 2000 – 20 % , more than 2000 30%. Input no of items and unit p

Assignments [ Assignment 2 ] - C Programming

  ASSIGNMENT - 2     ----- -------------------------- Note: All the questios in this assignmens are based on if ... else .. Input a number and check this number is even or odd. Input the year [yyyy] and check whether this year is a leap year or not. Input a number and check this number is negative or positive number. Write a program to input a number and check whether this number is negative or positive. If negative change it into positive and if positive change it into negative. Input two numbers and check which number is greater. Write a C program to check whether a number is divisible by 5 and 11 or not. Input three numbers and check which the greatest number is. Enter the Real Price and Selling Price and then print whether it is profit or loss. Write a program to input a character and check whether the character is in lowercase or in uppercase. Write a program to input a character and check whether it is in lowercase or in uppercase. If in lowercase change it into uppercase. If in

Assignments [ Assignment 1] - C Programming

  ASSIGNMENT - 1   -------------------------- Write a program to input a number and print it. Write a program to input two numbers and add them, then print the answer. Write a program to input two float values and find the sum of those values. Write a program to input a character and print that. Write a program to input a lowercased character and convert it into upper case. Write a program to input an uppercased character and convert into lowercase. Input two numbers and find addition, subtraction, multiplication, and division. Input two numbers and find the remainder which is obtained by dividing first number by second. Input a number and find the difference of its cube and square. Input the weight in kg and convert it into grams. Write a program to input time in seconds and convert into hours. Input full marks and obtained marks calculate percent marks. Input obtained marks and percent marks – calculate full marks Input Real price and profile percent and then calculate New Price. Cal