اخبار فناوری اطلاعات

نرم افزار،شبکه،سخت افزار،کدبرنامه نویسی و

اخبار فناوری اطلاعات

نرم افزار،شبکه،سخت افزار،کدبرنامه نویسی و

کلمات کلیدی
آخرین نظرات

۹ مطلب با موضوع «کد برنامه نویسی» ثبت شده است

برنامه ی که معادله درجه یک حل میکند.

سمیرا نوری | يكشنبه, ۳ آبان ۱۳۹۴، ۰۳:۲۲ ب.ظ

public class EquationSolver {

    // Solves a*x + b = 0

    public static void SolveEq1(double a, double b) {

        double x = -b/a;

        System.out.print("Solving equation: ");

        System.out.format("%f * x + %f  = 0\n", a, b);

        System.out.format("Results:\nx = %f\n", x);

    }

}


  • سمیرا نوری

برنامه ای که نشان می دهد یک عدد زوج است یا فرد بصورت گرافیکی

سمیرا نوری | يكشنبه, ۳ آبان ۱۳۹۴، ۰۳:۲۰ ب.ظ

import javax.swing.*;

public class Project{

    public static void main(String[] args)

    {

        String ans= JOptionPane.showInputDialog("enter number");

        int n= Integer.parseInt(ans);

        String Message;

        if (n%2==0)

            Message="even number";

        else

            Message="odd number";

        JOptionPane.showMessageDialog(null,Message);

    }

}

  • سمیرا نوری

تبدیل زمان و نشان دادن نهایی آن+java

سمیرا نوری | پنجشنبه, ۳۰ مهر ۱۳۹۴، ۰۶:۳۷ ب.ظ

import java.util.Scanner;

public class Saat{

public static void main(String args[])

{

Scanner input=new Scanner(System.in);

int hour,second,minute;

System.out.println("enter hour");

hour=input.nextInt();

if(hour>=25)

System.out.println("choose a number between 1-24");

else

System.out.print(hour+"=saat\n"+ hour*60 +"=minutes\n"+hour*3600 +"=seconds");

System.out.println("enter minutes");

minute=input.nextInt();

if(minute >=60 || minute<=0)

    System.out.println("enter number between 1 to 60");

System.out.println(minute + "=minutes\n"+minute*60 +"=seconds\n");

System.out.println("enter seconds");

second=input.nextInt();

if(second>=60)

    System.out.println("enter a number between 1-60");

System.out.println(second+"= seconds");

System.out.print("the time is=");

System.out.println(hour +":"+minute+":"+second);

}

}

  • سمیرا نوری

جدول ضرب 10*10

سمیرا نوری | دوشنبه, ۲۳ شهریور ۱۳۹۴، ۱۰:۳۳ ب.ظ

#include<iostream>

#include<conio.h>

using namespace std;

void main()

{

int i,j;

for(i=1;i<=10;i++){

for(j=i;j<=10;j++)

cout<<i*j<<" ";

cout<<endl;}

getch();

}

  • سمیرا نوری

ز++فاکتوریل به زبان سی++

سمیرا نوری | پنجشنبه, ۱۹ شهریور ۱۳۹۴، ۱۰:۰۰ ب.ظ

#include<iostream>

#include<conio.h>

using namespace std;

void main()

{

  • سمیرا نوری

دوز به زبان c++

سمیرا نوری | پنجشنبه, ۱۹ شهریور ۱۳۹۴، ۰۹:۵۴ ب.ظ


#include<iostream>

#include <stdio.h>

#include <stdlib.h>

#include <conio.h>


char matrix[3][3];

void cou(void);

int main()

{

  • سمیرا نوری

8 vazir به زبان c++

سمیرا نوری | پنجشنبه, ۱۹ شهریور ۱۳۹۴، ۰۹:۴۷ ب.ظ

#include <iostream>

#include <iomanip>

#include <cstdlib>

#include <ctime>

#include<conio.h>

using namespace std;

 const int SIZE = 8;

 bool validMove( int, int, const int [][ SIZE ] );

 void printBoard( const int [][ SIZE ] );

void main()

  • سمیرا نوری

zarb 2 adadبه زبان c++

سمیرا نوری | پنجشنبه, ۱۹ شهریور ۱۳۹۴، ۰۹:۴۶ ب.ظ

#include<iostream>

#include<conio.h>

using namespace std;

int mystery(int a ,int b)

{

if(b==1)

return a;

else

return a+mystery (a ,b-1);

}

void main()

{

int x,y;

cin>>x>>y;

cout<< mystery(x,y);

getch();

}


  • سمیرا نوری

fekr o bekr

سمیرا نوری | پنجشنبه, ۱۹ شهریور ۱۳۹۴، ۰۹:۴۴ ب.ظ

#include <iostream>

#include <cstdlib>

#include <ctime>

using namespace std;

  • سمیرا نوری