Fibonacci series is a sequence of numbers in which next number in the sequence is obtained by adding previous two…
Browsing: computer science 2nd year
#include <stdio.h> #include <conio.h> //Largest Number – FScOnline.info int main() { int i,num,n,large=0; printf(“How many numbers: “); scanf(“%d”,&n); for(i=0; i<n;…
#include <stdio.h> #include <conio.h> //Reverse Number – FScOnline.info int main() { int num,rev=0,mod; printf(“Enter Number: “); scanf(“%d”,&num); while(num!=0) { mod=num%10;…
#include <stdio.h> #include <conio.h> //Find average marks of 5 subjects – FScOnline.info int main() { int a,b,c,d,e,average; printf(“Enter marks of…
Print ASCII of a Character Using Integer Variable #include <stdio.h> #include <conio.h> //Program to Print ASCII of a Character -…
Program to convert given number of days into years, weeks and days Get number of days from user Divide number of…
Program to swap 2 variable values without using third variable Add both variables in 2nd variable subtract 1st from 2nd and store…
Program to swap 2 variable values using third variable Store value of 1st variable in third variable that is temporary Store…
Program to find area of circle using radius or diameter 2 functions one will calculate and return area of circle…
Heron’s Formula for the area of a triangle(Hero’s Formula) A method for calculating the area of a triangle when you…