Posts

Showing posts from April, 2020

Program to Convert lower case to upper

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to Convert lower case to upper  int num;  char ch;  cout<<"press any letter either upper or lower =";  cin>>ch;  num=ch;  if(num>=65&&num<=90)  {   num=num+32;   ch=num;   cout<<"the lower case of your letter is ="<<ch;  }else if(num>=96&&num<=122)  {   num=num-32;   ch=num;   cout<<"the upper case letter is ="<<ch;  }else  cout<<"your input in invalid please try again"; getch();     return 0;   }

Program to calculate electricity bill of consumed units

#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; int main() {  //Program to calculate electricity bill of consumed units  int units,curunits,preunits;  float bill;  cout<<"Enter the current reading =";  cin>>curunits;  cout<<"Enter the previous reading = ";  cin>>preunits;  units= curunits-preunits;  if(units<100)  bill = 2.0*units;  if(units>100 && units<=200)  bill = ((2.5*units)+(units*0.5/100.0));  if(units>=200 &&units<=300)  bill = ((3.5*units)+(units*0.6/100.0));  if(units>400)  bill=((4.0*units)+(units*0.7/100.0));  cout<<"The electricity bill is ="<<bill; getch();     return 0;   }

Program to find out the given number is prime or not

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to find out the given number is prime or not  int i,num,count;  cout<<"Enter any number :";  cin>>num;  count = 0;  i=1;  do{   if(num%i==0)   count=count+1;   i++;  }while(i<=num);  if(count==2){   cout<<"The number is Prime ";  }  else{   cout<<"The number is not prime";  } getch();     return 0;   }

Program to sovle basic mathematical operation

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to sovle basic mathematical operation  int a,b,res;  char z;  cout<<"Enter the value of A =";  cin>>a;  cout<<"Enter the value of B =";  cin>>b;  cout<<"Enter the operation you want to perform like (+,-,*,/)";  cin>>z;  switch(z)  {   case '+':   res=a+b;   break;   case '-':   res=a-b;   break;   case '*':   res=a*b;   break;   case '/':   res=a/b;   break;   default:   cout<<"please press any operator";  }  cout<<"The result is ="<<res; getch();     return 0;   }

Program to sovle mathematical series

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to sovle mathematical series  int i,n;  float result,k,j;  cout<<"Enter any number you want to series =";  cin>>n;  result =1;  k=0;  for(i=1;i<=n;i++)  {   result = result*i;   j=i/result;   k=k+j;  } cout<<"1/1! + 2/2! +3/3! + 4/4! + .... + n/n! = "<<k; getch();     return 0;   }

Program to find out the day of given date

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to find out the day of given date  int d,m,y;  int td,r,i,j,ny;  int n=0;  int ly=0;  cout<<"Enter the Day (01)";  cin>>d;  cout<<"Enter the Month (02)";  cin>>m;  cout<<"Enter the Year (2010)";  cin>>y;  for(i=1;i<m;i++)  {   if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)   n=n+31;   else if(i==2 && y%4!=0)   n=n+28;   else if(i==2 &&y%4==0)   n=n+29;   else if(i==4 || i==6 || i==11)   n=n+30;  }  for(j=2010;j<y;j++)  {   if(j%4==0)   ly=ly+1;  }  ny=(y-2010)-1;  td=ly+n+d+(ny*365);  r=td%7;  switch(r)  {   case 0 :   cout<<"The day is Sunday ";   break;   case 1 :   cout<...

Program to calculate factorial of given number

#include <iostream> #include <conio.h> using namespace std; int main() {  //Program to calculate factorial of given number   int a,n;   double res;   cout<<"Enter Number = ";   cin>>n;   res=1;   for(a=1;a<=n;a++)   res=res*a;   cout<<"The Factorial of Given number is ="<<res; getch();     return 0;   }

Addation in c++

#include <iostream> #include <conio.h> using namespace std; int main() {    int a,b;    cout<<"enter the value of A and B "<<endl;    cin>>a>>b;    int sum = a+b;       cout<<"Sum = "<<sum;     getch();     return 0; }

Building Youtube UI in 20 min || java || javafx

<?xml version="1.0" encoding="UTF-8"?> <?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXTextField?> <?import java.lang.String?> <?import javafx.geometry.Insets?> <?import javafx.scene.control.Label?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> <HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="670.0" prefWidth="1300.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="youtube.FXMLDocumentController">    <children>       <VBox prefHeight="670.0" prefWidth="93.0" style=...

TABLE IN C++

#include <iostream> #include <conio.h> using namespace std; int main() {  //program to display the table of given Number  int sum,counter,n;  cout<<"Enter the Number of Table you want to display = ";  cin>>n;  counter = 1;  in:   sum = n*counter;   cout<<n<<"*"<<counter<<" = "<<sum<<endl;   counter=counter+1;   if(counter<=20)   goto in;      getch();     return 0; }

Designing Dashboard UI Using JavaFx | Dribble_Profile_Main

Image

Designing Dashboard UI Using JavaFx | Dribble_Profile_Main

//FXMLDocuments.fxml <?xml version="1.0" encoding="UTF-8"?> <?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXTextField?> <?import javafx.scene.control.Label?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.text.Font?> <HBox fx:id="root" alignment="TOP_RIGHT" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="670.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dribble_profile_main.FXMLDocumentController">    <children>       <Pane prefHeight="670.0" prefWidth="1146.0" style="-fx-background-color...

C++ TUTORIAL - Exercise Checking if the number is prime or not

Image

C++ TUTORIAL - Exercise Checking if the number is prime or not

Image

https://youtu.be/S3pT3qwRaDE

https://youtu.be/S3pT3qwRaDE