수업과제

김현진 2주차수업

홰홰횋 2024. 3. 12. 13:52

 

C언어들의 장단점

 

 

각 개발도구의 장단점


챗 GPT로 디버깅

 

#include
int main()
{
printf("Hello World")
return 0;

 

}

 

 

C언어 표준 언어


각 언어별 기본 소스

  • C++
#include <iostream>
int main()
{
std::cout<<"Hello World";

 

return 0;
}
 
  • C
#include
int main()
{
printf("Hello World");
return 0;

 

}

 

  • JAVA
public class Main
{
public static void main(String[] args) {
System.out.println("Hello World");
}
}

 


뒤죽박죽한 코드 정렬 및 주석 작성


개발도구 대신 "IDE"라 부름


DEV-C++을 활용하여 이름 출력

 

C

#include <stdio.h>

int main() {
  printf("Hello World!");
  return 0;
}

 

C++

#include <iostream>
using namespace std;

int main() {
  cout << "Hello World!";
  return 0;
}

 

C#

using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}

 

JAVA

public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

 

JAVASCRIPT

<!DOCTYPE html>
<html>
<body>

<h2>My First JavaScript</h2>

<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>

<p id="demo"></p>

</body>
</html> 

 

파이썬

print("Hello, World!")